RSS Forums RSS
Please support our MS SQL advertiser: Programming Forums

In-line If-Else Block?

Join Date: Apr 2006
Posts: 2
Reputation: versatilewt is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
versatilewt versatilewt is offline Offline
Newbie Poster

Question In-line If-Else Block?

  #1  
Apr 20th, 2006
Hi,

I'm writing some complex queries on a very poorly designed database. We're running on MS SQL Server2000. I was wondering if its possible to do in-line if-else blocks within a query.. i.e.

[PHP]
SELECT *
FROM tablename
IF (condition1 = 'a')
WHERE condition2 = 'a'
ELSE
WHERE condition2 = 'b'
[/PHP]
AddThis Social Bookmark Button
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:57 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC