Latest News

the latest news from our team

SQL ResultSet Preprocessor

For a use of the SQL ResultSet Preprocessor, consult the following post: Create placeholder names for SQL columns

The markers are string patterns to match in the data file. When a line in the data file starts with the “SQL Statement Marker”, the line is used for the SQL Statement. When a line in the data file starts with the “Substitution Marker”, the line is a positional substitution value. The “Substitution Match” specifies the characters in the SQL Statement to substitute with a positional substitution value.  When a line starts with the “Parameter Marker”, the line is a positional parameter value. Parameters are specified in the SQL statement with a “?”. When a line doesn’t start with any marker, the line is a positional parameter value. Using the following data file:

#sqlselect orderno, fname, lname, item, qty, price, wrap, size, color from # as t1, # as t2 where t1.orderno = ? and t1.orderno = t2.ordernumber
#parm199723820101
#suborderheader
#suborderlines

The select statement becomes:

select orderno, fname, lname, item, qty, price, wrap, size, color from order header as t1, orderliness as t2 where t1.orderno = ? and t1.orderno = t2.ordernumber

The value “199723820101” is used as the first parameter (where the ? is ).

Leave a Reply

Your email address will not be published. Required fields are marked *