I have a bunch of legacy parametrized SQL templates that were used by nzsql utility for Netezza. See examples here: http://queforum.com/netezza/347918-parameterized-sql-file-input-nzsql.html
What is the algorithm that nzsql command line utility is using for parsing parameters?
Background: I am writing a SQL generation utility in python and I need to be able to pass the parameters to my legacy parametrized SQL templates and get pure SQL back. For that, I need to mimic the exact rule for what nzsql considers a parameter.
Part of an answer from the forum link above:
You have to specify a colon before the variable name. An example is shown below:
select * from :TABLENAME
I need to figure out where the parameter name ends. I think it can happen at word bounds, but also a period forces the end of a parameter name, i.e.
select * from :DBNAME..TABLENAME
I would love to know the exact rules, but so far have not found any documentation.