Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 exclude data
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Constraint Violating Yak Guru

420 Posts

Posted - 05/22/2013 :  04:05:54  Show Profile  Reply with Quote
how can i exclude in this scenario?

case when date = 2013-01-01 then color which is blue will not be pull out..while other color will be pulled..

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 05/22/2013 :  04:10:51  Show Profile  Reply with Quote
As per you explanation sounds like this

FROM Table
WHERE Color <> 'blue' 
OR datefield <> '20130101'

SQL Server MVP
Go to Top of Page

Transact Charlie
Flowing Fount of Yak Knowledge

United Kingdom
3451 Posts

Posted - 05/22/2013 :  04:17:10  Show Profile  Visit Transact Charlie's Homepage  Reply with Quote
Or the logical equivalent:

NOT ( Datefield = '20130101' AND Color = 'Blue' )

Transact Charlie
Msg 3903.. The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION.

Edited by - Transact Charlie on 05/22/2013 04:17:28
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000