SQL Syntax Error

SELECT V_FlatContractWithABNS_NZ.Contract_ID,
V_FlatContractWithABNS_NZ.ContractType,
V_FlatContractWithABNS_NZ.STR_StartDate,
V_FlatContractWithABNS_NZ.Term,
Securities.SecurityTpe_ID,
V_FlatContractWithABNS_NZ.AmountFinanced,
V_FlatContractWithABNS_NZ.SourceName,
V_FlatContractWithABNS_NZ.PaymentMode
FROM {oj [SSNZ0015\MonthEnd]."Beam Retail Core".dbo.V_FlatContractWithABNS_NZ V_FlatContractWithABNS_NZ
LEFT OUTER JOIN [SSNZ0015\MonthEnd]."Beam Retail Core".dbo.Securities Securities ON V_FlatContractWithABNS_NZ.Contract_ID = Securities.SecurityType_ID
WHERE
(V_FlatContractWithABNS_NZ.Contract_ID
In('654987','123456'))

Im getting an error saying "Incorrect syntax near the keyword 'WHERE'. Please help!!

Hi

Looks like there are special hidden
characters in your code

This could be the problem

{jo

Remove this and try

Thanks

Hi,

Thanks for your reply. I did manage to find the issue. It was related to the two Tables not being linked.

Thanks for the help!

Ralph

Thanks for your help!