Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exists clause in Sql Expression Field

Status
Not open for further replies.

ratjetoes

Programmer
May 24, 2002
30
NL
hi,

i've got a little problem. i've written a sqlstatement using an exists clause.

ex.
select c.a, o.b
from .order o left outer join customer c on c.id=o.id
where not EXISTS
(select u.c
from uitval u
where u.x=o.x)

the error it returns says that the subquery can return more than one value (correct) without having the EXISTS keyword in the main query (incorrect, i have the exists keyword after where not...). anyone any idea how to write the query with the exists clause in the sql expression field?

t.i.a.,
erik.
 
What version of CR are you on.

SQL Expression fields do not accept any sort of select statements, SQL Expression fields are used to create calculated columns using SQL language.

Select Statements can only be entered as commands to generate the report data.

HTH

Gary Parker
Systems Support Analyst
Manchester, England
 
tnx for your help, got it working now in a command object like you suggested.

greetz,
erik.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top