From: A. Kretschmer <andreas.kretschmer@schollglas.com>
To: pgsql-sql@postgresql.org
Subject: Re: Using a variable as a view name in a select
Date: Tue, 3 Apr 2007 15:16:38 +0200
Message-ID: <20070403131638.GF30108@a-kretschmer.de> (raw)
In-Reply-To: <7CCC5BEF5E72394C963E529B54EB4A642A19B3@SD01ITMV12.PROD.NET>
References: <141386.39515.qm@web57105.mail.re3.yahoo.com>
<7CCC5BEF5E72394C963E529B54EB4A642A19B3@SD01ITMV12.PROD.NET>
am Tue, dem 03.04.2007, um 9:04:00 -0400 mailte Wilkinson, Jim folgendes:
> I have created a view, called april_may. I need to select this view by
> combineing to fields in the database to create the view name etc ?
Please, no answer to an other mail and change the subject to a new
subject. Your mail sorted in the wrong thread.
> Select * from (select table.start_month||_||table.end_month);
>
> ==================
>
> Start_month = april
>
> End_month = May
>
>
>
> What I what to pass to the select is the combination of the 2 fields as the
> view name.
Perhaps with a function that receive start and end and returns the
result as a table (set-returning function)
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: andreas.kretschmer@schollglas.com
Subject: Re: Using a variable as a view name in a select
In-Reply-To: <20070403131638.GF30108@a-kretschmer.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox