Results 1 to 1 of 1
Thread: Looping with changing variable
11-08-12, 19:08 #1Registered User
- Join Date
- Nov 2012
Unanswered: Looping with changing variable
I would like to run a set of SQL code on a repeat loop, with each loop using a different value for a specific parameter.
In other words, I have a data set (X,Y,Z) and I want to run the code passing X as a variable, using Y, and then again using Z. I actually have more than 3 values to run, I have around 100, so I would prefer to store them in a separate table I can query from on each loop.
I was thinking stored procedure but since I am a novice I have never used them before.
I am using Netezza with Aginity workbench but it's based on postgresql so any help you can provide would be great.
Last edited by gsm113; 11-08-12 at 19:13.