X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4E1A9D922B for ; Fri, 30 Sep 2005 12:38:46 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 15613-03 for ; Fri, 30 Sep 2005 15:38:42 +0000 (GMT) Received: from hotmail.com (bay109-f33.bay109.hotmail.com [64.4.19.43]) by svr1.postgresql.org (Postfix) with ESMTP id 1CA44D8ED9 for ; Fri, 30 Sep 2005 12:38:41 -0300 (ADT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 30 Sep 2005 08:38:40 -0700 Message-ID: Received: from 64.4.19.200 by by109fd.bay109.hotmail.msn.com with HTTP; Fri, 30 Sep 2005 15:38:40 GMT X-Originating-IP: [64.4.19.200] X-Originating-Email: [sadcox66@hotmail.com] X-Sender: sadcox66@hotmail.com From: "Scott cox" To: pgsql-sql@postgresql.org Subject: creating postgres tables by passing a string to function Date: Fri, 30 Sep 2005 15:38:40 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 30 Sep 2005 15:38:40.0933 (UTC) FILETIME=[0862DD50:01C5C5D5] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=4.098 required=5 tests=[DNS_FROM_RFC_ABUSE=0.374, DNS_FROM_RFC_POST=1.376, FROM_ENDS_IN_NUMS=0.516, MSGID_FROM_MTA_HEADER=0, RCVD_IN_BL_SPAMCOP_NET=1.832] X-Spam-Level: **** X-Archive-Number: 200510/21 X-Sequence-Number: 22874 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