Skip site navigation (1) Skip section navigation (2)

Re: Function problem

From: "Patrick Hatcher" <PHatcher(at)macys(dot)com>
To: josh(at)agliodbs(dot)com
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Function problem
Date: 2002-03-16 03:19:58
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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

                    "Josh Berkus"                                                                                  
                    <josh(at)agliodbs       To:     "Patrick Hatcher" <PHatcher(at)macys(dot)com>                            
                    .com>                cc:     pgsql-novice(at)postgresql(dot)org                                       
                                         Subject:     Re: [NOVICE] Function problem                                
                    06:49 PM                                                                                       


> 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

-Josh Berkus

pgsql-novice by date

Next:From: Josh BerkusDate: 2002-03-16 21:10:31
Subject: Re: Function problem
Previous:From: Josh BerkusDate: 2002-03-16 02:49:57
Subject: Re: Function problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group