Toad World® Forums

Using Multiple Values for a Variable

Greetings
Can a variable be set to process multiple values. For example:

Var1 to return a query for regions 4,5,6,8
Var2 to return a query for regions 22,56,78,90

Regards

Hi hdabbas,

I am sure there are multiple ways to to this but you could accomplish this in the VQB (Visual Query Builder) by creating a vaiable for each of the options. Forexample, if I wanted to be able to pick up to three values for RegionID, I could create a filter that looked like this:
image
When the query runs I could choose to enter a value for each of the prompts or I could chose to not use one or more of the prompts:
image

1 Like

That's my first idea, as well. Use an IN operator and then group/sort on that column to organize the results.

Thank you both. I am going to use the Export wizard to run multiple query files in order to get all the excel report I need to generate. I will use an automation script to accomplish this task since I also need to FTP the reports and also save a copy for future reference.

1 Like