Stored Procedure Arguments
Date: 3 Feb 99 13:38:06 GMT
Message-ID: <01be4f7a$8d4eaae0$157d74cb_at_default>
Hi,
[Quoted] [Quoted] I have this stored procedure which is supposed to move a record from one database to another database. I passed in the database names as arguments to the procedure.
CREATE OR REPLACE FUNCTION MOVE_RECORD
{ ID IN VARCHAR2, FROM_DB IN VARCHAR2, TO_DB IN VARCHAR2 }
RETURN VARCHAR2 AS ....
BEGIN
...
INSERT INTO tablename1_at_TO_DB VALUES
(.....)
END MOVE_RECORD. The problem is during execution, "tablename1_at_TO_DB" is interpreted as the table to insert the record. Instead of inserting the record into tablename1 at the database named in TO_DB. The only working way is to hardcode the database name in the procedure which is not neat programming.
Does anyone knows how can I overcome this problem?
Thanks in advance!!
Meina. Received on Wed Feb 03 1999 - 14:38:06 CET