Wednesday, 29 August 2012

Oracle PL/SQL Tutorial

Creating Procedure:

SQL> declare
  2  v_number NUMBER :=0;
  3  BEGIN
  4  v_number := v_number+10;
  5  end;
  6  /

PL/SQL procedure successfully completed.

SQL> save myfile.pls
Created file myfile.pls
SQL> clear buffer
buffer cleared
SQL> get myfile.pls
  1  declare
  2  v_number NUMBER :=0;
  3  BEGIN
  4  v_number := v_number+10;
  5* end;
SQL> /

PL/SQL procedure successfully completed.

SQL> start myfile.pls

PL/SQL procedure successfully completed.

SQL> @myfile.pld
SP2-0310: unable to open file "myfile.pld"
SQL> @myfile.pls

PL/SQL procedure successfully completed.

SQL> show error
No errors.
SQL> show errors
No errors.
SQL>

No comments:

Post a Comment

Script to update salespersons customer site wise in oracle apps R12

SELECT * FROM HZ_PARTIES WHERE PARTY_NAME LIKE 'DEENA VISION%'; SELECT * FROM HZ_CUST_ACCOUNTS_ALL WHERE PARTY_ID =94043 ; SE...