[GENERAL] How to store multiple rows in array .

Поиск
Список
Период
Сортировка
От Brahmam Eswar
Тема [GENERAL] How to store multiple rows in array .
Дата
Msg-id CA+wLFo2wXFyAmb26Qk8-HTELi0fb4Kr9-k0fAmJFYWh=xbDjZQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: [GENERAL] How to store multiple rows in array .
Список pgsql-general
Hi ,

System is migrating from Oracle to Postgre SQL. 
Oracle is providing BULK COLLECT INTO function to collect the multiple records from table .

 Select COL1,COL2 ,COL3  BULK COLLECT INTO LINES from Distinct_Records.

LINES IS TABLE OF TABLE1  (Defined lines as IS TABLE OF type).

In PotGres: 

   INV_LINES_T validate_crtr_line_items$inv_lines_rt ARRAY;
    L_INV_LINES INV_LINES_T%TYPE;
    L_INV_LINES$temporary_record ap.validate_crtr_line_items$inv_lines_rt;

 I'm trying to collect the records in L_INV_LINES 

SELECT ARRAY (SELECT COL1,COL2,COL3  FROM Distinct_Records) INTO L_INV_LINES;

Seems, Selecting  multiple columns into an array doesn't work in PL/pgSQL .

How to collect multiple columns into array which is composite data type of all select colums

--
Thanks & Regards,
Brahmeswara Rao J.

В списке pgsql-general по дате отправления:

Предыдущее
От: Matt Zagrabelny
Дата:
Сообщение: Re: [GENERAL] mild modification to pg_dump
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: [GENERAL] How to store multiple rows in array .