Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if then is one of select

Status
Not open for further replies.

smeyer

IS-IT--Management
Nov 15, 2002
52
US
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
 
Create a formula field for the logic, then select using the formula field Madawc Williams
East Anglia
Great Britain
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top