From: Wilkinson, Jim <Jim.Wilkinson@cra-arc.gc.ca>
To: pgsql-sql@postgresql.org
Subject: Using a variable as a view name in a select
Date: Tue, 3 Apr 2007 09:04:00 -0400
Message-ID: <7CCC5BEF5E72394C963E529B54EB4A642A19B3@SD01ITMV12.PROD.NET> (raw)
In-Reply-To: <141386.39515.qm@web57105.mail.re3.yahoo.com>
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 ...
Create view as select * from table_X;
I need to do something like this ...
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.
Any ideas ?
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: Jim.Wilkinson@cra-arc.gc.ca
Subject: Re: Using a variable as a view name in a select
In-Reply-To: <7CCC5BEF5E72394C963E529B54EB4A642A19B3@SD01ITMV12.PROD.NET>
* 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