Re: Question on 2 different tables

2004-01-22 Thread sulewski
I referred the left join because sub selects are not available in 4.0 (which is the release version) only 4.1. If I'm wrong on this please somebody tell me. Joe On Wednesday, January 21, 2004, at 10:45 PM, Randy Johnson wrote: SELECT * FROM tableone WHERE value NOT IN (SELECT column FROM

Question on 2 different tables

2004-01-21 Thread Randy Johnson
This example is simplified. I hope you understand Each table has one field called ID which is an integer and is the primary key Table 1 List of Programs 1 2 3 4 5 6 7 8 9 10 Table 2 Programs members have joined 1 5 8 Here is the scenario. I want to compare the values in table

Re: Question on 2 different tables

2004-01-21 Thread sulewski
I believe this would work select table1.* table1 left join table2 on (table1.id=table2.id) where tab2.id not null The left join will match the values together. Null values are inserted where matches are not made. Since 4 will not make a match null values will be put in place of the table2

Re: Question on 2 different tables

2004-01-21 Thread Randy Johnson
SELECT * FROM tableone WHERE value NOT IN (SELECT column FROM tabletwo) ; On Wed, 2004-01-21 at 15:26, Randy Johnson wrote: This example is simplified. I hope you understand Each table has one field called ID which is an integer and is the primary key Table 1 List of