[SQL] Related table question

Eric Forget forgete at cafederic.com
Thu Jan 15 02:56:11 CST 2004


Hi,

I have 2 tables:

    Table1 has some fields...

    Table "Keyword" has:

        VDK_ObjectPtr        mTable1;
        VDK_String           mName;

If I query

SELECT DISTINCT Table1.RecID FROM Table1, Keyword WHERE Keyword.Name = 'me'

I will have all the records of Table1 that have a related Keyword.Name =
'me'.

For the reverse I tried:

SELECT DISTINCT Table1.RecID FROM Table1, Keyword WHERE Keyword.Name <> 'me'

This will works only if the record of Table1 has at least 1 related Keyword
relation. If it has not it is excluded. How can I include those?

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