Re: Using a variable as a view name in a select - Mailing list pgsql-sql

From A. Kretschmer
Subject Re: Using a variable as a view name in a select
Date
Msg-id 20070403131638.GF30108@a-kretschmer.de
Whole thread Raw
In response to Using a variable as a view name in a select  ("Wilkinson, Jim" <Jim.Wilkinson@cra-arc.gc.ca>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: "Wilkinson, Jim"
Date:
Subject: Using a variable as a view name in a select
Next
From: John Summerfield
Date:
Subject: Re: Using a variable as a view name in a select