Hi all I wrote a procedure to send email via plsql procedure, It was compiled sucessfully but not working ....here is the code (actuly i added the dbms output like step1 ,step 2 to see in which step the control is going on )create or replace PROCEDURE send_test_messageIS mailhost VARCHAR2(64) := 'mail.cmcltd.com'; sender VARCHAR2(64) := 'akash.sharma@cmcltd.com'; recipient VARCHAR2(64) := 'lalit.mohan@cmcltd.com'; mail_conn utl_smtp.connection;BEGIN
Latest Answer: You add the psedocolumn rowid to the selected fields of the cursors body.This rowid identifies the selected record uniquely so that you can update with it, like with the primary key (just faster).Update tab where rowid=cur_rec.rowid; ...
I wanted to know how to move backwards while scanning recods in a cursor when meeting with a perticular condition.For example, if after scanning 50th record of a recorset, I have to make some updates in 25th record. How to go about it?
Latest Answer: Hi.....yes we can create a table by using a procedure or a function but it must be done by Dynamic SQL. Dynamic SQL is a programming technique that enables you to build SQL statements dynamically at runtime. lets say you want to create an EMP table ...
Hi all if i can assign any value to the out parameter in procedures .... like i had created this procedure ...CREATE ORE REPLACE PROCEDURE MODETEST ( PARAMETER OUT NUMBER)ISJUSTTEST NUMBER :=20;BEGINPARAMETER :=JUSTTEST ; *HERE I ASSIGN VALUE TO OUT PARAMETER *JUSTTEST := PARAMETER;dBMS_OUTPUT.PUT_LINE(JUSTTEST);END; AND THE PROCEDURE IS CREATED WITHOUT ANY ERROR BUT I THAUGHT THE OUT PARAMETERS ARE WRITE ONLY AND WE CANT ASSIGN ANY VALUE TO IT ....
Latest Answer: We can call a function from anonymous block as a part of sql statement written in that block.eg: create or replace function fn_emp(v_empno in number)return varchar2 isbeginselect ename into v_ename from empwhere empno=v_empno;return v_ename;end;this function ...
Latest Answer: use execute immediate to write DDL statements.but you should have create system previlege on the schema. ...
Latest Answer: From sql*plus we can use commands to change the code.we can append,insert or delete any line of code in a procedure. ...
How to run a curser for update "with hold2 in PL/SQL ?Example:declarecursor CSRtest is select * from emp for update of lastname;beginfor i in CSRtest loop...do something...call procfedure with "commit"update emp set lastname = "..." where current of CSRtest;endloop;Results in "ORA-01002: fetch out of sequence" because curser is closed after "Commit"How to "save state of curser" ?Any workaround?
Latest Answer: A nested loop is a loop within a lop, an inner loop within the body of an outer one. How this workds is that the first pass of the outer loop triggers the innter which executes to completion. Then the second pass of the outer loop triggers the loop again. ...
View page << Previous 6 7 8 9 [10] 11 12 13 14 15 Next >>

Go Top