File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Apache Velocity - Problem: Structuring an SQL script in a template ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Apache Velocity - Problem: Structuring an SQL script in a template ?" Watch "Apache Velocity - Problem: Structuring an SQL script in a template ?" New topic
Author

Apache Velocity - Problem: Structuring an SQL script in a template ?

Melvin Mah
Greenhorn

Joined: Oct 04, 2012
Posts: 6
Hi all,

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?

or

3. Is there any sample of my need that I can use as reference to that?

Thanks in advance.


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Apache Velocity - Problem: Structuring an SQL script in a template ?