Re: Help with TYPE syntax

From: Robert Klemme <shortcutter_at_googlemail.com>
Date: Thu, 23 Jun 2011 17:51:34 +0200
Message-ID: <96h5o6Fo39U2_at_mid.individual.net>



On 06/23/2011 05:04 PM, The Magnet wrote:
> I'm sure this is a syntactical issue, but I'm still searching the web:
>
> CREATE OR REPLACE TYPE estimate_date_type AS OBJECT (
> qr1_end_date DATE,
> qr2_end_date DATE,
> fr1_end_date DATE,
> fr2_end_date DATE);
> /
> CREATE OR REPLACE TYPE estimate_date_tab AS TABLE OF
> estimate_date_type;
> /
>
> DECLARE
> v_dates_tab estimate_date_tab := estimate_date_tab();
>
> BEGIN
> v_dates_tab := estimate_date_tab(SYSDATE, SYSDATE, SYSDATE,
> SYSDATE);
> .
> .
> .
> PLS-00306: wrong number or types of arguments in call to
> 'ESTIMATE_DATE_TAB'
Well, as it says: since it's a table of estimate_date_type you need to pass in estimate_date_type instances and not DATEs. Maybe

v_dates_tab := estimate_date_tab(estimate_date_type(SYSDATE, SYSDATE, SYSDATE, SYSDATE)); Just guessing since I don't have an Oracle handy right now.

Kind regards

        robert Received on Thu Jun 23 2011 - 10:51:34 CDT

Original text of this message