Unanswered: Need help with PREPARE statement within a stored procedure.
Am a relatively new guy to DB.
I need to use the PREPARE command within a stored procedure.
When i write the following
EXEC SQL PREPARE query_stmt FROM 'select * from emp_info'
I get the following error
Server: Msg 170, Level 15, State 1, Procedure bsp_rpt_EmployeeReport, Line 10
Line 10: Incorrect syntax near 'query_stmt'.
Can anyone guide on how to use the PREPARE command within a stored procedure.