Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread problem with suqueries
Sat, Aug 11 2012 8:59 AMPermanent Link

Paul Waegemans

IMS bvba

Avatar

I made a query but the result is not correct.  What could be the problem.  The result is showing records from people that have records in the file com_leden



Attachments: Queryproblem1.jpg
Sat, Aug 11 2012 4:36 PMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Paul,

It's perhaps an issue with the precedence of the boolean operators AND and OR.
Try to add parenthesis to the expression, it might help you making it more readable and make clear in what order shall the various expressions be evaluated.
It's hard to tell you exactly how to do it as I have no idea about what would you consider a correct result.
Also, in future please be gentle and post the sql in text format and not as an image Smiley

--
Fernando Dias
[Team Elevate]
Sun, Aug 12 2012 3:48 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Paul


Have you tried breaking the query down into its components and checked if they all work separately? I've always found it useful to test out the individual chunks in DBSys before combining them.

Roy Lambert [Team Elevate]
Image