Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 31C2F9FB2F4 for ; Tue, 3 Oct 2006 00:16:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 47028-04 for ; Tue, 3 Oct 2006 00:16:01 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from talk.nabble.com (www.nabble.com [72.21.53.35]) by postgresql.org (Postfix) with ESMTP id A95C79FB2DB for ; Tue, 3 Oct 2006 00:15:58 -0300 (ADT) Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1GUalA-0001l3-Em for pgsql-sql@postgresql.org; Mon, 02 Oct 2006 20:15:56 -0700 Message-ID: <6613652.post@talk.nabble.com> Date: Mon, 2 Oct 2006 20:15:56 -0700 (PDT) From: chrisj To: pgsql-sql@postgresql.org Subject: Assigning a timestamp without timezone to a timestamp with timezone MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 7bit X-Nabble-From: chrisj.wood@sympatico.ca X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.513 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200610/10 X-Sequence-Number: 26399 Hi Does any one have any ideas for the following problem? Two tables both the have open and close columns that are timestamp or timestamp with time zone. One row in first table represents the corporate office default open and close times for all stores relative to the store?s own time zone for a particular day. The second table represents the specific open and close time for a specific store for a specific day, occasionally a store?s hours can be different from the corporate default. Table1: open_time timestamp close_time timestamp Table2: store_number int open_time timestamp with timezone close_time timestamp with timezone I would like to be able to initialize table 2 from table 1. Suppose I had a store table that contained Store_table: Store_number int Store_tz char(03) I would like to do something like: Insert into Table2 Select S.store_number ,cast(T1.open_time as timestamp with timezone at S.Store_tz) ,cast(T1.close_time as timestamp with timezone at S.Store_tz) from Store_table S, Table1 T1 -- View this message in context: http://www.nabble.com/Assigning-a-timestamp-without-timezone-to-a-timestamp-with-timezone-tf2373845.html#a6613652 Sent from the PostgreSQL - sql mailing list archive at Nabble.com.