views:

63

answers:

1

Hi, Im trying to use SET SCAN ON after as follows..

SET SCAN OFF;

DECLARE
  -- declared a variable
BEGIN
  --update statement
END;

SET SCAN ON;

The use of SET SCAN ON; is causing the error when i try to run the script. The error captured

ORA-06550: line 16, column 1:
PLS-00103: Encountered the symbol "SET" 
06550. 00000 -  "line %s, column %s:\n%s"
*Cause:    Usually a PL/SQL compilation error.
*Action:
+3  A: 

If that is exactly what you are trying to run the solution is simple. Add a / to finish off the anonymous PL/SQL block:

SET SCAN OFF; 

DECLARE 
  -- declared a variable 
BEGIN 
  --update statement 
END; 
/

SET SCAN ON;

This is because PL/SQL syntax uses ; to signal the end of a line of code, so we need the / to fire our program.

APC
Its working... :-) Thanks a lot..
Karthik