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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Easy - I hope

Author  Topic 

REEPER
Yak Posting Veteran

53 Posts

Posted - 2006-11-30 : 15:49:18
I want to do a select statement on a table. The criteria being I want all the rows except the ones with a couple of differnat values in 1 column:

Meaning give me all rows unless ColumnName = CB10 or CB20.

MCP, MCSD

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2006-11-30 : 15:51:23
Here's one way:

where <ColumnName> not in ('CB10', 'CB20')

Be One with the Optimizer
TG
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-12-01 : 02:56:44
Learn SQL
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -