Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
tariq2
Posting Yak Master
125 Posts |
Posted - 2011-07-14 : 07:07:01
|
| I am trying to find all fields of the records within proddta.f0911 where gldoc,gljeln exists witin the subquery.I am receiving the following error:Msg 4145, Level 15, State 1, Line 5An expression of non-boolean type specified in a context where a condition is expected, near ','.Many thanks in advance for your helpselect * from openquery(symprod_etldev,'select * from proddta.f0911 where glco = ''10002'' and globj = ''445791'' ')where gldoc,gljeln in (select a.gldoc,a.gljeln from openquery(symprod_etldev,'select * from proddta.f0911 where glco = ''10002'' and globj = ''445791'' ')aleft outer join(select GLDOC,GLJELN from F0911 where GLCO = '10002' and GLOBJ = '445791')bon a.gldoc = b.gldoc and a.gljeln = b.gljelnwhere b.GLJELN IS NULL) |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-07-14 : 07:34:39
|
WHERE ... IN(...) is only possible for one column at a time.So you need for example:WHERE x IN(...)AND y IN(...) No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
tariq2
Posting Yak Master
125 Posts |
Posted - 2011-07-14 : 08:36:45
|
| Thank you webfred :) |
 |
|
|
|
|
|