Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TEradata dynamic sql output

Status
Not open for further replies.

peac3

Technical User
Jan 17, 2009
226
AU
Hi Guys,

I have TERADATA STORED procedure that have dynamic sql inside.

I would like to check the output the dynamic sql compiled and got struggle with the syntax even after i did the google.

Code:
SET v_SQL = 'SELECT TOP 10* from table name where id = ' || v_number || ';';

-- I would like to check the output of v_sql before I execute
CALL DBC.SysExecSQL(:v_SQL);

Your help would be appreciated.

Thanks,
 
Just run this query
SELECT TOP 10* from table name where id = ##

Replace ## with a suitable ID Number, assuming variable v_Number is a number.

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top