Home » SQL & PL/SQL » SQL & PL/SQL » To Execute Update Statment Dynamically.
To Execute Update Statment Dynamically. [message #37344] Fri, 01 February 2002 01:06 Go to next message
Shashidhara.N
Messages: 1
Registered: February 2002
Junior Member
Hi,
i want to clarify whether it is possible to execute update statment dynamically in oracle 7.3.1.
here is my pl/sql block.

CREATE OR REPLACE PROCEDURE DYNAMICUPDATE(op1 in VARCHAR2,
er out VARCHAR2)
AS
STR VARCHAR2(100);
BEGIN
STR := '';
ER := '';
STR := 'UPDATE DYNAMIC SET EMPNAME = ''KKKK'' WHERE ';
IF ltrim(rtrim(op1)) <> ' ' THEN
STR := STR || ' RATING <= ''' || OP1 || ''';';
END IF;
execute STR;
ER := 'UPDATE SUCCESS';
EXCEPTION
WHEN OTHERS THEN
ER := SQLERRM;
ROLLBACK;
END;
Re: To Execute Update Statment Dynamically. [message #37362 is a reply to message #37344] Fri, 01 February 2002 20:58 Go to previous message
Milind S Deobhankar
Messages: 33
Registered: January 2002
Member
I cannot say regarding Oracle 7.1 but in oracle 8.1.7 you can by using bind variable go to sqlprompt and type this
spool c:trial
desc dbms_sql
spool off
find the method bind variable in trial.lst
if there is the i can help you furthur.

The reason behid is that I donot have Oracle 7.1
Previous Topic: Current date
Next Topic: Are there any tools?
Goto Forum:
  


Current Time: Fri Apr 19 12:47:39 CDT 2024