I have created a stored procedure with some parameters (variables)
the parameters can contain different values, therefore I need to implement arrays;
Could someone help me on the right way?
I have created following but I am still receiving an error in running the script; could anyone check? The select should return all records with the values identified in the parameter before running the procedure.
step 1 : create array type:
create type table_name_array as varchar(10) array
step 2 : create stored procedure:
CREATE OR REPLACE PROCEDUREmyproc
p_table_name IN table_name_array ,
SET p_table_name = Array['T001', 'T002', 'T003'];
table_name IN (case when p_table_name is null then table_name else p_table_name end)
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