Quantcast
Channel: SCN : All Content - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 757

How simulate a logical 'OR' and 'AND in T-SQL?

$
0
0

I know we have an IF and ELSE in Sybase SQL but I'm pretty sure there's no logical OR or AND, am I right?  Is there a way to simulate these?  I guess I can simulate "IF condition1 and condition2 then dothis" with:

 

IF condition1

BEGIN

     IF condition2

     BEGIN

          dothis

     END

END

 

But I'm not sure how to simulate an "or".  Any help would be appreciated.


Viewing all articles
Browse latest Browse all 757

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>