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 |
|
MxWebb
Starting Member
8 Posts |
Posted - 2007-01-30 : 10:50:26
|
| Ok need some help here.What I am doing is trying to add something to my sql statement that will show records that don't match..Here is what I am looking at.Rec1 Rec2DAL02 1 DAL02 9DAL03 2 DAL03 10DAL05 4 DAL05 11So what I wantis to select all the rows but either creates field that show me which Records don't match on Second field or some flag so I don't have to visual go throw and find them. Yes I can actualy write the Sql so it only pulls back the records that match on both fields but I need a way so you can look and Really see that result are true.Hope this makes sence..Select #Temp1.org_acronym, #Temp1.Maxcount, #Temp2.org_acronym, #Temp2.MaxcountFrom #Temp1, #Temp2Where #Temp1.org_acronym = #Temp2.org_acronymThanksMichael Webb |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-01-30 : 10:52:47
|
[code]Select #Temp1.org_acronym, #Temp1.Maxcount, #Temp2.org_acronym, #Temp2.MaxcountFrom #Temp1 inner join #Temp2On #Temp1.org_acronym = #Temp2.org_acronymwhere #Temp1.Maxcount <> #Temp2.Maxcount[/code] KH |
 |
|
|
|
|
|