Toad World® Forums

Toad gives invalid SQL error for valid package spec.


#1

Toad for Oracle Base 12.12.0.39

When i try to execute this code in a editor window Toad returns this error. “ORA-00900: invalid SQL statement”. But when I run it in SQL Plus it compiles without issue.

/* Formatted on 3/15/2018 3:19:30 PM (QP5 v5.318) */

CREATE OR REPLACE PACKAGE PKG_TEST
AS
TYPE AssocArrayOfNumber_t IS TABLE OF NUMBER
INDEX BY BINARY_INTEGER;

PROCEDURE TEST_PROC (
pId1 IN NUMBER,
pId2 IN NUMBER,
pId3 IN AssocArrayOfNumber_t DEFAULT CAST (NULL AS AssocArrayOfNumber_t),
pId4 IN AssocArrayOfNumber_t DEFAULT CAST (NULL AS AssocArrayOfNumber_t)
);
END PKG_TEST;
/


#2

Change:

END PKG_TEST;

To

END;

That gets rid of the ORA-900. Looks like a bug in TOAD. I have 12.9, and this is an issue here as well.

Cheers,
Russ


#3

This is fixed for Toad 13. The fix is in the current beta.

Michael