Re: ROWTYPE
Date: Tue, 21 Jun 2011 06:21:18 -0700 (PDT)
Message-ID: <93daed08-c086-4994-986c-7a4437561063_at_l18g2000yql.googlegroups.com>
On Jun 21, 2:28 am, Björn Wächter <Bjoern.Waech..._at_web.de> wrote:
> Hi,
>
> I think the NULL is the Problem. If I define the cursor like this:
>
> CURSOR ticker_detail IS
> SELECT mt.ticker, . . . . EST_DATE_LIST() est_date_list
> FROM stock_data sd,
> master_table mt,
> ......
>
> It works for me.
Very nice! I'm not sure exactly how Oracle is reading that, because EST_DATE_LIST() is a TYPE, not a column. But it works. Now here is the kicker, is there any way for me to select data from a table directly into that type?
So, for example I have this from above:
BEGIN
OPEN ticker_detail;
FETCH ticker_detail BULK COLLECT INTO v_read_record;
CLOSE ticker_detail;
Now, v_read_record is a collection, with EST_DATE_LIST() as one of the elements. I'd like to select data (4 values) from another table and place them into EST_DATE_LIST() in the collection, or am I stuck selecting the data into variables, and then assigning the variables like so:
v_dates_tab := estimate_date_type(v_qr1_end_date, v_qr2_end_date, v_fr1_end_date, v_fr2_end_date); v_read_record(x).estimate_dates := v_dates_tab;
Is there a way to select the values directly into v_read_record(x)?
Thanks again! Received on Tue Jun 21 2011 - 08:21:18 CDT