main logo
Subject: suppose ... (SQL syntax) 2
Author: Luca Porfiri
Posted: 2002/09/28 18:56:34
 
View Entire Thread
New Search


It could seem:

WHERE

A = xxx AND B = yyy AND (C = zzz OR D = kkk)

but I have also a DISTINCT relation to verify between table1.F and table2.F
depending the result of D = kkk ... so where to put it?

Now I built it:

SELECT * FROM DISTINCT table1, table2 WHERE

table1.A = xxx AND table1.B = yyy AND (table1.C = zzz OR table1.D = kkk) AND
table1.F = table2.F

but it doesn't work properly at all ... and my brain too ... at this hour
:-)
It seems to always ignore
table1.A = xxx AND table1.B = yyy AND (table1.C = zzz
and consider only
OR table1.D = kkk

Thanks

Luca

> Da: Luca Porfiri <liste At mail .D.OT sting.it>
> Risposta: valentina@lists.macserve.net (Subscribers of Valentina)
> Data: Sun, 29 Sep 2002 01:34:51 +0200
> A: valentina At lists .D.OT macserve.net (Subscribers of Valentina)
> Oggetto: suppose ... (SQL syntax)
>
> I wish to retrieve occurrences WHERE:
>
> A = xxx AND B = yyy AND C = zzz
>
> OR
>
> A = xxx AND B = yyy AND D = kkk
>
> which is the correct SQL syntax? I cannot find the right.
> Could someone help me?
>
> Thanks!
>
> Luca
 
©2002 Luca Porfiri
<-- Prior Message New Search Next Message -->