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 |
|
PBoy
Starting Member
22 Posts |
Posted - 2010-05-24 : 17:18:59
|
| Hi All,Just new to the joys of SQL I have been getting on ok but Im a little stuck and hope to get some help.What Im lookings to do is to using the where clause if possible to create a query that show a list on transaction on that have a perticual value that does not match, for example we have a table that holds who a person reports to on it, and a table that hold expenses data, however when the expenses do into the workflow process the reports to is picked up and used, but when the expenses is in workflow the reports to could be changed (for what ever reason) is there a way using the where clause to say only show expenses where the reports to in (table one) does not match the reports to (table two)?I thought maybe something like Where table1.reports_to != table2.reports_toWould that even work or is it just daft?CheersPatrick |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
PBoy
Starting Member
22 Posts |
Posted - 2010-05-26 : 18:30:26
|
| Thanks Tara, I used the NOT EXISTS on a few other tables and it worked great :)CheersPatrick |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|