Hi,
I have a macro that is passed in a key field, and returns multiple rows. I need to be able to run this macro in a loop with input provided dynamically (from a table).
I thought about using a stored procedure, but according to documentation a stored procedure can only return one row. I thought about using a macro, but I cann't figure out how to loop in a macro (based on documentation it agains appears to be something a stored procedure only can do). Therefore, I'm stuck.
I will then need to output the results of this query into a table and use it to query against another table, but if I can get the macro to loop, I think I can handle the rest.
I have a macro that is passed in a key field, and returns multiple rows. I need to be able to run this macro in a loop with input provided dynamically (from a table).
I thought about using a stored procedure, but according to documentation a stored procedure can only return one row. I thought about using a macro, but I cann't figure out how to loop in a macro (based on documentation it agains appears to be something a stored procedure only can do). Therefore, I'm stuck.
I will then need to output the results of this query into a table and use it to query against another table, but if I can get the macro to loop, I think I can handle the rest.