Skip to Content
0
Former Member
Dec 20, 2010 at 10:05 AM

Query error

45 Views

query on UDF

IF $[OIGE.Series.Number]= 65

begin

Select OIGN.U_BP_Name From OIGN where DocNum =$[OIGE.U_JW_NO]

End

If $[OIGE.Series]= 64

Begin

select CardName from OCRD

END

If $[OIGE.Series]= 17

Begin

select CardName from OCRD

END

when i m executing this query it generate this error :

Error. [Microsoft][SQL Native Client][SQL Server]Incorrect syntax near

the keyword 'FOR'. 2). [Microsoft][SQL Native Client][SQL

Server]Statement '' (NFN1) (s) could not be prepared.