anonymous block

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Parul Vinod
    New Member
    • Aug 2011
    • 36

    anonymous block

    I was running the following code in sql server 2000 dev. edition
    Code:
    1.	BEGIN
    2.	   NULL;
    3.	END;
    when i got the error:
    incorrect syntax near the keyword ‘NULL’.
    I also tried:
    Code:
    1.	SET SERVEROUTPUT ON SIZE 1000000
    2.	BEGIN
    3.	   DMBS_OUTPUT.PUT_LINE('Hello PL/SQL');
    4.	END;
    5.	/
    when i got the error:
    ‘serveroutput’ is not a recognized option.

    How to overcome these errors?
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    1) NULL is a value that represents nothing. Of course it's going to error out.

    2) That is Oracle, not SQL Server. Either you're trying to use Oracle code in SQL Server, which won't work. Or you posted in the wrong forum.

    Comment

    Working...