[SQL] Related table question
Ruslan Zasukhin
sunshine at public.kherson.ua
Thu Jan 15 20:15:42 CST 2004
on 1/15/04 7:24 PM, Eric Forget at forgete at cafederic.com wrote:
>>> 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,
I have made simple test in Valentina Studio.
Table A { a1 }
1
2
3
Table B { ptr ,b1 }
1 1
1 2
1 3
2 1
2 2
Now when I do
select *
from a, B
WHERE a.recID *= b.ptr
and b.b1 <> 1
I get
a ptr b1
1 1 2
1 1 3
2 2 2
3 null null
So query works right.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list