Not sure I fully understand that
Query to get table1:
SELECT p,pc
FROM Table2
Result:
--------------------
user job
--------------------
joe manager
sam Staff
harry manager
Query that gets recordset:
SELECT Table1.p, Table1.pc
FROM Table1 INNER JOIN
Table2 ON Table1.p = Table2.testp AND Table1.pc =
Table2.testpc
Result:
--------------------
user job
--------------------
joe manager
harry manager
dick staff
So what would be the complete query ?
Thanks for your help.
Justin
-----Original Message-----
From: Aidan Whitehall [mailto:[EMAIL PROTECTED]
Sent: 05 December 2003 14:42
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] SQL question
> is there a way to get this (i.e. anyone in table1 that don't have
matching
> rows in the query) in SQL
In principle, do an outer join between the two tables and filter (i.e.
add in your "where" clause) on those rows where the somCol = null.
--
Aidan Whitehall <mailto:[EMAIL PROTECTED]>
Macromedia ColdFusion Developer
Fairbanks Environmental Ltd +44 (0)1695 51775
Queen's Awards Winner 2003 <http://www.fairbanks.co.uk/go/awards>
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]