You could also do:

SELECT person_id,bill_id,notes
FROM table1
WHERE person_id NOT IN(SELECT person_id from table2)

At 03:54 PM 3/1/01 -0600, you wrote:
>This is the SQL code that is returned from Access when you use the query
>wizard for finding something in one table that is not in another
>
>SELECT [Table1].[Person_ID], [Table1].[Bill_ID], [Table1].[Notes]
>FROM Table1 LEFT JOIN Table2 ON [Table1].[Person_ID] = [Table2].[Person_ID]
>WHERE ([Table2].[Person_ID] Is Null);
>
>Hope this helps.  Is is a feature built into Access 2000
>
>Larry Juncker
>Senior Cold Fusion Developer
>Heartland Communications Group, Inc.
>
>
>-----Original Message-----
>From: Vano, Carl G, SITS [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, March 01, 2001 3:20 PM
>To: CF-Talk
>Subject: SQL: select records from table 1, that are not in table 2 ?
>
>
>How would I select only the records from table 1, that are not in table 2.
>
>1       2
>A       A
>B       B
>C       C
>D
>E
>F
>
>expected query result:
>
>D
>E
>F
>
>
>Thanks!
>Carl
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to