Results 1 to 1 of 1
  1. #1
    Join Date
    Nov 2012

    Unanswered: Looping with changing variable

    Hi all,

    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 20:13.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts