SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
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  

Aged Yak Warrior

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

Premature Yak Congratulator

22847 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"?


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

Very Important crosS Applying yaK Herder

52325 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

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