is ther a way to perform a select based upon the results of an if statement such as:
if (@storeNum) = 1
select (drawNo) is one of 11,12,13
else if (@storeNum) = 2
select (drawNo) is one of 21,22,23
if (@storeNum) = 1 then (drawNo) in 11 to 13
else
if (@storeNum) = 2 then (drawNo) in 21 to 23
The above formula will only work if you want EVERY value between 11 and 13. or say you had non-consective {drawno} for a given condition, then slightly modify your formula as follows
if (@storeNum) = 1 then (drawNo) in [11,12,13,17,24,31] Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.