Toad World® Forums

Procedure to get minimum set of records from each table



I am very much new to DB2 stored procedures.I have a scenario as I need to read a table(consists only one column with 1000 records) as a procedure1 & to pass that value to another procedure2.On that second procedure it should accept the value (table name) from procedure1 & I need to query some set of records from all the tables.I can do this as a program.Thing is that I need to do all these as db2 procedures itself. As, I am new to these procedures unable to figure it out.

Sample snippet of code will be appreciated.

Kindly help me.
Thanks in advance