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
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
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Aged Yak Warrior

567 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

22864 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

52326 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  
 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