SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

peace
Constraint Violating Yak Guru

410 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..

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

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

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


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
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.
http://nosqlsolution.blogspot.co.uk/

Edited by - Transact Charlie on 05/22/2013 04:17:28
Go to Top of Page
  Previous Topic Topic Next Topic  
 New 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.05 seconds. Powered By: Snitz Forums 2000