Skip to content
Advertisement

Multiple Loop with a SQL Query Function – 2 Minute Interval between Queries

Need to loop twice through the query function below loading the results into two seperate variables. The query function works as expected, but need to have two unique queries stored in the two temp tables. How should I create these temporary tables that allow me to reference them as $1_resultsDataTable and $2_resultsDataTable? I will use these two tables to do a compare-object once I can successfully populate these TempTables.

Advertisement

Answer

Not sure why you would specifically need to use named variables instead of just assigning to an array, but you could just list both variables to be assigned to the output of your loop and then loops twice.

You could still do compare without named variables using an array instead

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement