[SQL] Query from different Database

2004-10-07 Thread Abdul Wahab Dahalan
I'm looking for a solution to make a query from two different databases. If anybody has an experience or know how to solve it, please help me. Thanks. ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.

Re: [SQL] Query from different Database

2004-10-07 Thread Robert Creager
When grilled further on (Thu, 7 Oct 2004 16:52:38 +0800 (MYT)), Abdul Wahab Dahalan <[EMAIL PROTECTED]> confessed: > I'm looking for a solution to make a query from two different databases. If > anybody has an experience or know how to solve it, please help me. Thanks. > I believe that the co

Re: [SQL] Query from different Database

2004-10-07 Thread Jaime Casanova
--- Robert Creager <[EMAIL PROTECTED]> escribió: > When grilled further on (Thu, 7 Oct 2004 16:52:38 > +0800 (MYT)), > Abdul Wahab Dahalan <[EMAIL PROTECTED]> confessed: > > > I'm looking for a solution to make a query from > two different databases. If > > anybody has an experience or know h

[SQL] help on a query

2004-10-07 Thread Michelle Murrain
Hi all, This is one of those things I know I should know, but it's not coming to me. It's probably really simple. I have two related tables, registrations and receipts, related by the field registration_id. So registrations looks kinda like: registration_id bigint (primary key) foo varchar(10)

Re: [SQL] help on a query

2004-10-07 Thread Thomas F . O'Connell
A query that should get the job done is: SELECT registration_id FROM registrations r WHERE NOT EXISTS ( SELECT 1 FROM receipts WHERE registration_id = r.registration_id ); There might be a more efficient version with JOINs that don't require a subquery, but this should get

Re: [SQL] help on a query

2004-10-07 Thread sad
On Friday 08 October 2004 07:10, Thomas F.O'Connell wrote: > A query that should get the job done is: > > SELECT registration_id > FROM registrations r > WHERE NOT EXISTS ( > SELECT 1 > FROM receipts > WHERE registration_id = r.registration_id > ); Don't, PLEASE, don't !!! drive