All Forums Tools
kishu 26 posts Joined 03/08
23 Jul 2008
Query fails using bteq but works fine with queryman

Hi, I am using below mentioned query. This query works fine when i am using it in queryman but when i use this query through bteq then i am getting syntax error. I am unable to find any solution.Please help me out in this problem.select (casewhen SRC.name != TGT.name then tgt.namewhen SRC.name is null or TGT.name is null then tgt.name end) name, (casewhen SRC.age != TGT.age then tgt.agewhen SRC.age is null or TGT.age is null then tgt.age end) age from User1.test1 SRC,User1.test2 TGT where TGT.id=SRC.id;where table test1 and test2 are having three columns id(PK),name and ageError : $*** Failure 3707 Syntax error, expected something like an 'IN' keyword between the word 'name' and '|'. Statement# 1, Info =31*** Total elapsed time was 1 second.Thanks,Kunal

dhirajpalse 36 posts Joined 01/08
24 Jul 2008

Change != to <> ..it will work..

Dhiraj

kishu 26 posts Joined 03/08
24 Jul 2008

Thanks a lot...It is working.................Kunal

You must sign in to leave a comment.