[SQL] Related table question
Ruslan Zasukhin
sunshine at public.kherson.ua
Sun Jan 18 10:26:22 CST 2004
on 1/18/04 7:24 AM, Eric Forget at forgete at cafederic.com wrote:
Hi Eric,
> First, thank you very much for the time you took to resolve those issues.
> And that during a weekend!
What is weekend? :-)
> To summarize, I'm planning to use these rules:
>
> 1) From the master SELECT I never do a FROM Keyword.
>
> 2) I always write the keyword clauses either:
>
> a) For equality:
> a.RecID in (select ptr from keyword where name = 'Me')
>
> b) For inequality:
>
> a.RecID not in (select ptr from keyword where name <> 'Me')
>
>
> However, I see b) working without understanding it. For me it looks like a
> double negation. Maybe there is something about SQL I don't understand.
This is query of kind:
WHERE fld IN (v1, v2, v3)
Here you do not see problems?
In your query we use subselect to get LIST of values.
WHERE fld IN (select ptr FROM T ... )
--
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