Anyone familiar with using Choose with a list?
N2IT
Inactive Imported Users Posts: 7,483 ■■■■■■■■■■
All the examples of Choose seems to reference a position ranking followed by the list (predefined). Can you build a date list for example and then reference the date list with choose? When I try to use choose on a date list it pulls back all the fields in the list.
Right now I am using a max sub select to reference the same table to create a dynamic max query to pull the latest date range. I was hoping choose could do this. Thanks!
Right now I am using a max sub select to reference the same table to create a dynamic max query to pull the latest date range. I was hoping choose could do this. Thanks!
Comments
-
NotHackingYou Member Posts: 1,460 ■■■■■■■■□□I think you could use CHOOSE(@Pos, 'Date1','Date2',Date3') ?When you go the extra mile, there's no traffic.
-
N2IT Inactive Imported Users Posts: 7,483 ■■■■■■■■■■I was hoping to reference the listchoose(2,'DateList')
I tried casting the datelist to varchar and some other techniques. It reminds me of the choose in excel and just a limited -
NotHackingYou Member Posts: 1,460 ■■■■■■■■□□I can't seem to get CHOOSE to work with a subquery. You may have to make a UDF or SP that when called queries a table and builds up your params based on the # of results.When you go the extra mile, there's no traffic.
-
N2IT Inactive Imported Users Posts: 7,483 ■■■■■■■■■■It seems to be very limited. O well I am moving on enough about CHOOSE lol.