I do not see why you couldn't build SQL text statement from whatever source data you want. For me to comment further I would have to understand what SQL statement(s) you want to construct. Knowing the end result we could engineer backward to provide the proper data constructs to be used in making the SQL.
_________________________
Home page: http://www.kixhelp.com/hb/