Subject | Re: [ib-support] select etc. |
---|---|
Author | Paul Vinkenoog |
Post date | 2003-03-18T11:14:10Z |
Hi Michael,
select <fieldlist> from table1
where not exists
(select MyField1 from table2 where table2.MyField1 = table1.MyField1)
BTW: This situation _looks like_ you could merge the two tables into
one, where some fields would just be null/empty in some records.
Greetings,
Paul Vinkenoog
> Lets say I have two tables.I'd say
> They are linked via MyField1 which i allocated in both tables.
> Table1 contains 100 records and table2 contains MAX 100 record (one
> per record in table1).
> In this exampel table 2 contains 25 records.
>
> Can I make a select statement, that will select those 75 records from
> table1 one, that DOES NOT have a corresponding record in table2 ?
select <fieldlist> from table1
where not exists
(select MyField1 from table2 where table2.MyField1 = table1.MyField1)
BTW: This situation _looks like_ you could merge the two tables into
one, where some fields would just be null/empty in some records.
Greetings,
Paul Vinkenoog