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.
Brian Stincer
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