I'm connected to a DB2 datasource thru TD Sql assistant. I'm writing a simple query to pull purchase order header and detail info for a specific PO number as in the example below. However I'm trying to write it using a variable that will pass a specific PO # that I pass, but I keep getting error message. Below is what I'm running w/o the variable which runs successfully, and with the variable.
This is a DB2 question and not Teradata or even SQL Assistant. Is DECLARE VARIABLE even supported via ODBC?
DECLARE VARIABLE is an embedable, non-excutable statement meant for pre-processor (or stored-procedures). See http://www.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/sqlref/src/tpc/db2z_sql_declarevariable.htm...
Like Fred said, you'll get a better response if you post your question in DB2 forums. SQL Assistant is just the "messenger" here :)
Got it! Thanks for explanation. This is my first post and I'm a TD newbie, so, since I'm using TD sql assistant to connect to DB2 and queries objects, I thouht it should be submitted under TD.