Project Description
DSQLT - Dynamic SQL Templates

Use Stored Procedures as templates for dynamic SQL statements.
Substitute parameters @0-@9 with values like objectnames or list of columnnames.
Iterate over cursor-resultset instead of constant values.
Write object-independent algorithms in T-SQL.

Documentation in English
Dokumentation (German) in Deutsch.

DSQLT has 2 major procedures.

The purpose is to read the content of special stored procedures, replace the placeholder (@0-@9) with the content of parameters and execute the generated SQL.

DSQLT.Execute does the described activities once.
DSQLT.Iterate needs a cursor as parameter and executes the template for each rowset of the cursor.

[Sample DSQLT Template]

Last edited Apr 4, 2012 at 9:18 PM by HenrikBauer, version 7