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};

    OR

@SetVariableFromFile arrayVar = 'filepath';


@foreach var in arrayVar


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


@done


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.


Thanks,

Brian Stincer


1 person likes this idea
1 Comment

Brian,


Thanks for the suggestion!


I will add your vote.


Regards


Roger

Login or Signup to post a comment