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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 how to execute the following command

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 D
FROM [bts].[cf07ur00].[a19]

I want to add the following query in SQL:

to exclude form this selection all
1- 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')
Go to Top of Page
   

- Advertisement -