Excellent! Thank you so much! I've been searching for this solution for a
very long time. Your response is very much appreciated.
Derrick
----- Original Message -----
From: "A. Kretschmer" <andreas.kretschmer@schollglas.com>
To: <pgsql-novice@postgresql.org>
Sent: Sunday, July 02, 2006 11:00 PM
Subject: Re: [NOVICE] Column names as variables in plpgsql
> am 30.06.2006, um 16:32:38 -0600 mailte Derrick Betts folgendes:
>> Is it possible to assign a column name to a variable and then use that
>> variable in a SELECT statement inside a function using plpgsql?
>
> Yes. You can define a string with your SQL, including variables. Thena
> you can EXECUTE this string.
>
> http://www.postgresql.org/docs/8.1/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN
>
>
> HTH, Andreas
> --
> Andreas Kretschmer (Kontakt: siehe Header)
> Heynitz: 035242/47215, D1: 0160/7141639
> GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
> === Schollglas Unternehmensgruppe ===
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
>