ERROR: could not find array type for data type numeric[]

Поиск
Список
Период
Сортировка
От Suha Onay
Тема ERROR: could not find array type for data type numeric[]
Дата
Msg-id ec9caa670905280552y1575408q9a272f3124fd221d@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
Hi,

I want to execute the following query in my Postgresql 8.3 but gives error:
ERROR:  could not find array type for data type numeric[]

When i googled, no result.

             SELECT 
*
             FROM (
                 SELECT
                     *
                 FROM(
                 SELECT
                     ARRAY(
                         (SELECT
                             (SELECT
-- The problem is here
                                 ARRAY[sum(borc_alacak[1]), 0.0] as kalantutar
-- if the line is not an array: "sum(borc_alacak[1]) as kalantutar" no problem. But, i need more results in an array.

                             FROM (
                                 SELECT
                                     fat.xxx as borc_alacak, fat.vadetarihi
                                 FROM scf_fatura fat
                                 WHERE yyy

UNION ALL

                                 SELECT 
fissiz.xxx as borc_alacak, fissiz.vadetarihi
                                 FROM scf_odeme_fissiz fissiz
                                 WHERE yyy

                             ) as ignore

                             WHERE vadetarihi <= tarihler[2] AND vadetarihi >= tarihler[1]

                             ) as kalantutar

                             FROM (
                                 SELECT ARRAY[column1, column2] as tarihler FROM
                                 ( VALUES  ('2009-05-29'::date, '2999-01-01'::date) , 
                                 ('2009-05-01'::date, '2009-05-28'::date) ,  ('2009-04-01'::date, '2009-04-30'::date) ,  
                                 ('2009-03-01'::date, '2009-03-31'::date) ,  ('2009-02-01'::date, '2009-02-28'::date) ,  
                                 ('2009-01-01'::date, '2009-01-31'::date) ,  ('2008-12-01'::date, '2008-12-31'::date) ,  ('2008-11-01'::date, '2008-11-30'::date) ,  
                                 ('1899-01-01'::date, '2008-10-31'::date) ) as foo
                             ) as ddd
                         )
                     ) as tutarlar,

                     cari.*
                 FROM scf_carikart cari
                 WHERE cari.carikartkodu like '%DENEME%'
                 ) as ignore
             ) AS ST


------------------
Some parts of the sql is automatically generated. Lots of tables so i do not attached their structure.
It should be easy to find the problem.
Thanks in advance

Suha


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

Предыдущее
От: Grzegorz Jaśkiewicz
Дата:
Сообщение: Re: \dt+ on 8.4
Следующее
От: johnf
Дата:
Сообщение: ubuntu 9.04 and auto-start