creating postgres tables by passing a string to function

From: "Scott cox" <sadcox66(at)hotmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: creating postgres tables by passing a string to function
Date: 2005-09-30 15:38:40
Message-ID: BAY109-F333FA3BE29E1744F29825FCD8F0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I am storing data separated by month.
How do I perform Inserts and Selects based on something like this.

select * from (select 'shipped' || '0509') AS aShippingTable

The table 'shipped' || '0509' exists.

I am scanning barcode labels which have the '0509' on them and I want to
move the data
to appropiate monthly tables. '0510' would represent shipped on 2005
october.

Eventually I want to create, insert, select all based on passing a string
such as '0509' to a function.

I am a newbie.
Thanks in advance
-Scott

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message jan aerts (RI) 2005-09-30 16:01:37 combination of function to simple query makes query slow
Previous Message Mario Splivalo 2005-09-30 09:21:50 Re: EXECUTE SELECT INTO... last one!