Re: Stored Package

From: Robert C. Nix <rnix_at_us.oracle.com>
Date: 1996/03/06
Message-ID: <313D9851.154_at_us.oracle.com>#1/1


to see errors use "show errors" from SQL*Plus.

VARCHAR2's must specify a length (see below). the reason CHAR worked is because CHAR defaults to be a single character.

mcchan_at_cs.cityu.edu.hk wrote:
>
> Hi,
>
> I have tried to create a package using the example in Page 7-5 in the
> menu "PL/SQL User's Guide and Reference".
>
> CREATE OR REPLACE PACKAGE trans_data AS
> TYPE TimeTyp IS RECORD (
> minute SMALLINT,
> hour SMALLINT);
>
> TYPE TransTyp IS RECORD (
> category VARCHAR2,

change the previous line to something like:

                           category    VARCHAR2(2000),



> account INTEGER,
> amount REAL,
> time TimeTyp);
>
> minimum_balance CONSTANT REAL :=10.00;
> number_processed INTEGER;
> insufficient_funds EXCEPTION;
> END trans_data;
> /
>
> There was an error "Warning: Package created with compilation errors."
>
> I have some questions to ask:
> 1. How can I know what's wrong when there is such error;
> 2. I tried to change VARCHAR2 of the category to CHAR. There was not
> error. Why?
> 3. I want to declare a type using ROWTYPE as follows:
> TYPE emp_rec IS emp%ROWTYPE
> What's wrong?
>
> Thanks!
-- 
_________________________________________________
Robert C. Nix
Oracle Tools Support
mailto:rnix_at_us.oracle.com

The thoughts, opinions, remarks, statements, ...
expressed here are my own and do not necessarily
represent those of Oracle Corporation.
Received on Wed Mar 06 1996 - 00:00:00 CET

Original text of this message