Substituting table_name in pl/sql
From: Yasin <yasin_mohammed_at_yahoo.com>
Date: 2 Apr 2003 12:23:45 -0800
Message-ID: <b7157cbc.0304021223.30500a0_at_posting.google.com>
END;
/
Date: 2 Apr 2003 12:23:45 -0800
Message-ID: <b7157cbc.0304021223.30500a0_at_posting.google.com>
Here's the script:
>>>>>>>>
DECLARE
x NUMBER; y NUMBER; TABNAME CHAR(150); BEGIN x := 1; FOR channel IN ( SELECT PLGRPID FROM PLGROUP) LOOP TABNAME := 'PLGRPMSG'||x; SELECT COUNT(*) INTO y FROM TABNAME; DBMS_OUTPUT.PUT_LINE(TABNAME); x := x+1; END LOOP;
END;
/
<<<<<<<<
Thanks,
Yasin Received on Wed Apr 02 2003 - 22:23:45 CEST