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
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Select Query condition issue
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cplusplus
Aged Yak Warrior

532 Posts

Posted - 01/08/2013 :  17:49:40  Show Profile  Reply with Quote
I am having an issue with the below where condition, when i use OR it is not working. Even when i do or 1=1 is also not working, is there an alternate way to use without getting or.

(FISCYR = 2012 and (MACCOUNT = 3600 and SACCOUNT <> 800))
OR (MACCOUNT >= 3000 and MACCOUNT <= 3500)

Thanks a lot for the helpful info.

madhivanan
Premature Yak Congratulator

India
22713 Posts

Posted - 01/08/2013 :  23:31:43  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
What did you mean by "It is not working"?

Madhivanan

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

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 01/08/2013 :  23:41:55  Show Profile  Reply with Quote
first tell us with some sample data what exactly is your requirement

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

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.03 seconds. Powered By: Snitz Forums 2000