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 |
|
goligol
Posting Yak Master
128 Posts |
Posted - 2011-09-08 : 16:16:52
|
| I have the following table:SELECT geo_orig O ,geo_dest DFROM [bts].[cf07ur00].[a19]I want to add the following query in SQL:to exclude form this selection all1- geo_dest = "sub" when the geo_orig is "sub"2- geo_orig = "sub" when the geo_dest is "sub" |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2011-09-08 : 16:23:41
|
| WHERE NOT (geo_dest = 'sub' AND geo_orig = 'sub') |
 |
|
|
|
|
|