[SQL] Related table question

Eric Forget forgete at cafederic.com
Thu Jan 15 12:24:24 CST 2004


>>> You need to use LEFT OUTER JOIN
>>> 
>>> SELECT DISTINCT Table1.RecID
>>> FROM Table1, Keyword
>>> WHERE   Table1.RecID *= Keyword.mTable1 AND
>>>           Keyword.Name <> 'me'
>> 
>> This almost works. If I change it to something like:
>> 
>> SELECT DISTINCT Table1.RecID, Table1.Name
>> FROM Table1, Keyword
>> WHERE   Table1.RecID *= Keyword.mTable1 AND
>>          Keyword.Name <> 'me'
>> 
>> Or 
>> 
>> SELECT DISTINCT Table1.RecID
>> FROM Table1, Keyword
>> WHERE   Table1.RecID *= Keyword.mTable1 AND
>>          Keyword.Name <> 'me'
>> ORDER BY Table1.Name
>> 
>> Then all the records are returned. It looks like the "Keyword.Name <> 'me'"
>> is unused. Is it normal?
> 
> Do you get result records with 'me' ?

I'm not sure to understand your question. It returns all the record, even
the one that have a related keyword.Name = 'me'!

Eric

___________________________________________________________________

 Eric Forget                       Cafederic
 ForgetE at cafederic.com             <http://www.cafederic.com/>

 Fingerprint <86D5 38F5 E1FD 5D9C 71C3  BAA3 797E 70A4 6210 C684>




More information about the Valentina mailing list