Archives of the TeradataForum
Message Posted: Wed, 14 Aug 2002 @ 12:44:36 GMT
I would like to know if it is possible to prepare an sql statement within a stored procedure. Something as simple as the code below
Create Procedure mfrtest(simno char(10)) BEGIN Prepare My_Query Select sim_mfr_no from valid_mfr where sim_mfr_no = ?; Execute My_Query using :simno; End;
All I want to do is pass a parameter to the stored procedure and then dynamically create the SQL based on certain conditions. Every time I put the prepare statement in the store procedure i get errors.
Any help is greatly appreciated.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|