Re: Function problem

Поиск
Список
Период
Сортировка
От Patrick Hatcher
Тема Re: Function problem
Дата
Msg-id OF6E0DFE92.8FF3CCB9-ON88256B7E.0011B0E5@fds.com
обсуждение исходный текст
Ответ на Function problem  ("Patrick Hatcher" <PHatcher@macys.com>)
Список pgsql-novice
Ahhhhhhhh.  Thank you Josh.  I just learned something new.  I've been doing
it this way in MS SQL for years.

Patrick Hatcher
Macys.Com





                    "Josh Berkus"
                    <josh@agliodbs       To:     "Patrick Hatcher" <PHatcher@macys.com>
                    .com>                cc:     pgsql-novice@postgresql.org
                                         Subject:     Re: [NOVICE] Function problem
                    03/15/2002
                    06:49 PM






Partrick,

> This a snippet of a much longer procedure.  I am creating a cross-tab
>  of
> sales data and dumping it into a temp table.  A bunch of other temp
>  tables
> are created and then the whole thing is put together in 1 table for
> reporting purposes.  As stated earlier, it works if I don't put it
>  into a
> function and I think it has to do with my quotes (").

No, the problem is that SELECT INTO in a procedure is for selecting
 data into variables.  PL/pgSQL is expecting a variable named "TEMP"
 and not finding one.  Instead, how about using the more standard
 CREATE TABLE AS SELECT ... ?

-Josh Berkus





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

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: Function problem
Следующее
От: "Josh Berkus"
Дата:
Сообщение: Re: Function problem