Start a new topic

Add Syntax to enable for loop/foreach statement

It would be nice to be able to set a predefined list variable, and then run the same parameterized SQL statement over the entire list. For example:

@SetVariable arrayVar={table1, table2, table3};


@SetVariableFromFile arrayVar = 'filepath';

@foreach var in arrayVar

CREATE VIEW NewDB.${var}$  AS SELECT * FROM SrcDB.${var}$;


Of course the exact syntax would not need to match exactly as above, it would be whatever the developers deem most appropriate, but it would help automate repetitive jobs and I think add a lot of value to the DBVis product.


Brian Stincer

1 person likes this idea
1 Comment


Thanks for the suggestion!

I will add your vote.



Login or Signup to post a comment