Subject | RE: [firebird-support] SQL Select Joins Syntax |
---|---|
Author | Kevin Stanton |
Post date | 2004-03-20T15:42:14Z |
Thanks! to all - I've now got the results I was looking for.
Kevin
-----Original Message-----
From: James [mailto:james_027@...]
Sent: Friday, March 19, 2004 5:06 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] SQL Select Joins Syntax
Kevin,
Kevin Stanton wrote:
select [field list]
from Table2 T2
where not exists (select * from Table1 T1 where T2.ID = T1.ID )
This will display all the records in Table2 that is not in Table1 I
think ...
james
Yahoo! Groups Sponsor
ADVERTISEMENT
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Kevin
-----Original Message-----
From: James [mailto:james_027@...]
Sent: Friday, March 19, 2004 5:06 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] SQL Select Joins Syntax
Kevin,
Kevin Stanton wrote:
> Greetings,Try this if it will work
> I am currently joining:
>
> select [field list]
> from Table1 T1
> left outer join Table2 T2 on T1.ID = T2.ID
>
> This gives me everything in Table1 whether or not it exists in Table2.
>
> What is the best way to find out what is in Table2 that is not in Table1.
>
> Thanks,
> Kevin
select [field list]
from Table2 T2
where not exists (select * from Table1 T1 where T2.ID = T1.ID )
This will display all the records in Table2 that is not in Table1 I
think ...
james
Yahoo! Groups Sponsor
ADVERTISEMENT
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.