Re: Pls-00363

From: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 04 Oct 2005 09:14:15 -0700
Message-ID: <1128442448.359964_at_yasure>


TrynTry wrote:
> I am trying to create an object as below:
> CREATE TYPE type_tst AS OBJECT(
> sname VARCHAR2(9) NOT NULL DEFAULT '0',
> age NUMBER NOT NULL DEFAULT 0,
> idno NUMBER NOT NULL DEFAULT 0
> );
>
> I get the following error:
> LINE/COL ERROR
> --------
> -----------------------------------------------------------------
> 0/0 PL/SQL: Compilation unit analysis terminated
> 2/1 PLS-00363: expression 'SNAME' cannot be used as an assignment
> target
>
> What am I doing wrong? If I take out NOT NULL and DEFAULT, the type is
> created without any errors.

The syntax is invalid. Where did you find NOT NULL DEFAULT as valid syntax for a user defined data type?

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Tue Oct 04 2005 - 18:14:15 CEST

Original text of this message