List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:June 21 1999 11:44am
Subject:Re: SQL MANUAL online - query!
View as plain text  
At 6:11 AM +0000 6/21/1999, Sandrine C. wrote:
>> > IF I DO
>> > select produit.* from produit, TH_Produit, TH_Iteme
>> > where (produit.PR_Code=TH_Produit.PR_Code
>> > and TH_Produit.THI_Code=TH_Iteme.THI_Code
>> > and TH_Iteme.THI_Nom='Ss cycle 1.2');
>> >
>> > It gives me back PROD1, PROD2
>> >
>> > and IF I DO
>> > select produit.* from produit, TH_Produit, TH_Iteme
>> > where (produit.PR_Code=TH_Produit.PR_Code
>> > and TH_Produit.THI_Code=TH_Iteme.THI_Code
>> > and TH_Iteme.THI_Nom='Ss cycle 1.1');
>> >
>> > It gives me back PROD1
>> >
>>
>>Just use this one:
>>SELECT
>>	produit.*
>>FROM
>>	produit
>>	,TH_Produit
>>	,TH_Iteme AS it
>>	,TH_Iteme AS it2
>>WHERE
>>	produit.PR_Code = TH_Produit.PR_Code
>>	AND TH_Produit.THI_Code = it.THI_Code
>>	AND it.THI_Nom = 'Ss cycle 1.2'
>>	AND TH_Produit.THI_Code = it2.THI_Code
>>	AND it2.THI_Nom = 'Ss cycle 1.1'
>>
>
>I tried that already. IT DOESNT WORK !! and I woud like as well to do a
>query mixing AND and OR
>for exampkle if I want the Product inxed by
>(Ss cycle 1.1 AND Ss cycle 1.2) OR Ss cycle 1.3
>
>it is the same problem.. ni sultion :::(


Several solutions to your problem have been suggested, and apparently
none of them return any results.

Are you *sure* that the correct answer to the question you're asking
is non-empty?  That is, are there really any rows in your data that
satisfy the condition?

--
Paul DuBois, paul@stripped
Northern League Chronicles: http://www.snake.net/nl/
Thread
SQL MANUAL online - query!Sandrine C .18 Jun
  • Re: SQL MANUAL online - query!Martin Ramsch20 Jun
  • Re: SQL MANUAL online - query!Christian Mack21 Jun
Re: SQL MANUAL online - query!Sandrine C .21 Jun
  • Re: SQL MANUAL online - query!Paul DuBois21 Jun