Re: [GENERAL] How to store multiple rows in array .

Поиск
Список
Период
Сортировка
От brahmesr
Тема Re: [GENERAL] How to store multiple rows in array .
Дата
Msg-id 1511143938357-0.post@n3.nabble.com
обсуждение исходный текст
Ответ на Re: [GENERAL] How to store multiple rows in array .  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [GENERAL] How to store multiple rows in array .  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I already defined the composite type as
"validate_crtr_line_items$inv_lines_rt" with the selected
columns(COL1,COL2,COl3)

DeCLARE Block :
   INV_LINES_T  validate_crtr_line_items$inv_lines_rt ARRAY;   L_INV_LINES INV_LINES_T%TYPE;
L_INV_LINES$temporary_recordap.validate_crtr_line_items$inv_lines_rt;
 
Collecting the records into L_INV_LINES 

SELECT ARRAY (SELECT ROW (COL1,COL2, COUNT(*) *AS txn_cnt* )::
ap.validate_crtr_line_items$inv_lines_rt FROM Distinct_Records GROUP BY
COL1, COL2  HAVING COUNT(*) > 1) INTO L_INV_LINES;

ERROR:  syntax error at or near "AS"
LINE 73: COL1,COL2, COUNT(*) AS txn_cnt...

Why "AS" is throwing an error ?



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: Chris Mair
Дата:
Сообщение: Re: [GENERAL] parallel query in 9.6.6 + oracle_fdw -> ERROR: invalidcache ID: 41
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] How to store multiple rows in array .