Apache Velocity - Problem: Structuring an SQL script in a template ?
posted 4 years ago
Recently someone has mentioned to me that it's possible to create an SQL script around the structure of a Velocity template. Both of us agreed that it would be useful since there are activities of creating the same table structure (but with a different name) on a daily basis as well as injecting data in a loop.
In the original SQL script, it would be something like (it's an excerpt):
Apart from the #set section (variable and value assignment) can anyone help to clarify the following:
1. Do I have to add start / end tag to the entire sql script just conform to a structure?
2. Will the Java code still be able to read each SQL command individually without having to put extra separators / tags?
3. Is there any sample of my need that I can use as reference to that?