Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Benny57
Starting Member
4 Posts |
Posted - 2012-06-15 : 05:12:19
|
Hi!I am new to this, so i need some help with a query.I have 2 tablestable 1 with people that have signe up for some thingtable 2 with people that showed up.I want an answer that show me who of the people that signed up in table 1 and did not showed up in table 2.Any one that can help me with that? |
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2012-06-15 : 05:38:41
|
select *from table1where personid not in (select personid from table2)select *frrom table1 t1left join table2 t2on t1.personid = t2.personidwhere t2.personid is null==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
Benny57
Starting Member
4 Posts |
Posted - 2012-06-15 : 06:24:10
|
Thank's nigelrivett, works fine |
|
|
|
|
|