Hi

I would use to execute a sql-string:

CREATE DBPROC del_record (IN id FIXED(6), IN table_name VARCHAR(32))
AS
  Var stmt char(300);

  stmt = 'UPDATE '|| table_name ||' SET status = 1 WHERE id = '|| id ;
  execute stmt;

Because, only to use the variables in sql-statements while executing, causes errors (but I don't know the reason for that..). So you have to prepare your sql statements, I guess.

Regards,
Danny

Am Tue, 17 Jun 2003 12:48:05 +0700 hat Pavel Konovalov <[EMAIL PROTECTED]> geschrieben:

May be use the table name as parameter to the dbprocedure? For example:

CREATE DBPROC del_record (IN id FIXED(6), IN table_name VARCHAR(32))
AS
BEGIN
UPDATE :table_name SET status = 1 WHERE id = :id;
END;

Pavel Konovalov
________________________________
JS RCOM, Russia http://www.rscom.ru



_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general





-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to