3 Replies Latest reply on Oct 14, 2014 9:58 PM by rp0428

    SQL Developer 4 doesn't recognise parameters with spaces in the ANONYMOUS_BLOCK when executing stored procedures.

    kevd

      When executing procedures, in the ANONYMOUS_BLOCK, SQL Developer 4.0.3 incorrectly formats parameters that contain spaces.
      Most of the quotation marks are missing. For example:
      PROCEDURE sp_Test5 ("Param With Spaces 1" IN VARCHAR2, "Param With Spaces 2" IN VARCHAR2, "Param With Spaces 3" IN VARCHAR2, "Param With Spaces 4" IN NUMBER DEFAULT 0, O_Result_Set OUT pk_test.CURSOR_TYPE)
      .
      .
      .

      will produce an invalid ANONYMOUS_BLOCK as most of the parameters are unquoted:

      DECLARE
        Param With Spaces 1 VARCHAR2(200);
        Param With Spaces 2 VARCHAR2(200);
        Param With Spaces 3 VARCHAR2(200);
        Param With Spaces 4 NUMBER;
      .
      .
      .
       
      You then need to insert the missing quotations prior to execution.

      DECLARE
        "Param With Spaces 1" VARCHAR2(200);
        "Param With Spaces 2" VARCHAR2(200);
        "Param With Spaces 3" VARCHAR2(200);
        "Param With Spaces 4" NUMBER;
      .
      .
      .
       
        interestingly, further down it formats some of it correctly:
      .
      .
      .
          PK_TEST.SP_TEST5(
          "Param With Spaces 1" => Param With Spaces 1,
          "Param With Spaces 2" => Param With Spaces 2,
          "Param With Spaces 3" => Param With Spaces 3,
          "Param With Spaces 4" => Param With Spaces 4,
          O_RESULT_SET => O_RESULT_SET
        );
      .
      .
      .