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 |
|
Brandi
Starting Member
1 Post |
Posted - 2010-02-25 : 16:42:46
|
| Select lastname, firstname, personidFrom [identity] iSelect lastname, firstname, grade, timestamp, role, nameFrom [identity] iInner Join enrollment e on e.personid = i.personidInner Join BehaviorRole b on b.personid = i.personid Inner Join BehaviorEvent be on be.eventid = b.eventidwhere active = '1' and residentSchool = '1501004' and enddate is NULL and grade = '05' and [timestamp] >= '2009-08-01 01:53:00.000' and role = 'offender'Order by gradeI have these two tables and I need to find the difference between the two. I need to find out who does not have a behaveior role or Behavior event out of all the people. Thank you, |
|
|
vaibhavktiwari83
Aged Yak Warrior
843 Posts |
Posted - 2010-02-26 : 01:38:42
|
| Use left join instead of inner join and check for nullVabhav T |
 |
|
|
|
|
|