This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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.


 
 
subject: Apache Velocity - Problem: Structuring an SQL script in a template ?
 
Similar Threads
Poseidon for UML and code templates
ECLIPSE Plugin for automatic CRUD code generation
sending mail using velocity template
Template engine
what is the value prop of Velocity