View Full Version : Nesting SQL ???


RossG
02-03-2002, 12:26 PM
Is it possible to 'nest' pieces of SQL code ?

For example if I need a query such as:

" where (A = 1 AND B = 2) OR (A = 1 AND C = 2) "


can this be nested into something like:

" where (A = 1 AND (B OR C = 2)) "

Sorry if it sounds like a dumb question but I'm struggling with this SQL mumbo-jumbo!




[This message has been edited by RossG (edited 02-03-2002).]

Alexandre
02-04-2002, 12:29 AM
Perfectly possible. Correct syntax would be
WHERE (A=1 AND (B=2 or C=2)).

Alexandre