Re: select into

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: select into
Date: 2006-11-22 15:47:42
Message-ID: 20061122154742.GA28962@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

am Wed, dem 22.11.2006, um 0:28:15 -0800 mailte Mulham freshcode folgendes:
> Hi guys,
>
> Am new to sql scripting so this might be a stupid question. Am getting an
> error while trying to do the following
>
> SELECT INTO svc_data_rec * from svc_tbl_name where 'uid' = sub_id;
>
> where svc_data_rec is defined as record and svc_tbl_name is a varchar that
> holds the name of a table and sub_id is another varchar. the error message is

You should rewrite your plpgsql-function. You can't handle with
string-vars in this way, you must create a string with your complete sql
and EXECUTE this string.

Read
http://www.postgresql.org/docs/8.1/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47215, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

In response to

  • select into at 2006-11-22 08:28:15 from Mulham freshcode

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Broersma Jr 2006-11-22 15:55:29 Re: select into
Previous Message Mulham freshcode 2006-11-22 08:28:15 select into