I have a table with the following sample data.
S.No Table_Name Condition_Clause
1 xyz emp_id = 3
2 ABC Sal > 10000
3 KLM Age < 35
I've to write a DB2 procedure with "S.No" field as input and based on the input, it should select the "Table_Name" and the "Condition_Clause". I need to create a dynamic cursor using the "Table_Name" and "Condition_Clause" in the cursor definition "Select" statement and fetch the records from the cursor and process those records and insert new record in to some other table.
Is this scenario possible in DB2 Dynamic Cursors? For me it gives error for the dynamic cursor declaration. Can anyone help me on this with a sample code?
all sample code is available in sample directory of dB2
or in doc Stored procedure operators
why don't you publish the code and error you get
Best Regards, Guy Przytula
Database Software Consultant
Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
Information Server Datastage Certified http://www.infocura.be