Hi,
I would like to output to different (ideally dynamically created) sql tables based on the value of a column in a dataset.
eg. A column is called 'weeknum' and defines which week table that particular row should output to. The week table may or may not exist at the time.
If I could read the value of 'weeknum' into a user variable that would be great because I could then use that variable to define the output table name, problem is Im not sure if that is possible.
What Ive tried so far is on Control Flow have for each loop with collection of Variable Enumerator. The variable is called user::weeks and has value "select distinct(weeknum) as weeknum from weektable". I then have a mapping to user:: OneWeekInLoop starting at index 0 (cannot be changed). Both are defined as data type String and are in scope.
The first error I get is:Error: ForEach Variable Mapping number 1 to variable "User:: OneWeekinLoop" cannot be applied.
Help is appreciated.
Thx.
Gordon Meyer