Received: from venkat.vxl.co.in ([202.54.39.170]) by hub.org (8.9.3/8.9.3) with ESMTP id GAA04068 for ; Thu, 28 Oct 1999 06:43:26 -0400 (EDT) (envelope-from imtiaz_sm@yahoo.com) Received: from yahoo.com (postgres@localhost [127.0.0.1]) by venkat.vxl.co.in (8.8.7/8.8.7) with ESMTP id QAA11310 for ; Thu, 28 Oct 1999 16:17:04 +0530 Sender: postgres@venkat.vxl.co.in Message-ID: <381829A7.67949B14@yahoo.com> Date: Thu, 28 Oct 1999 16:17:03 +0530 From: "Imtiaz. S. M" Organization: VXL Instruments Ltd. X-Mailer: Mozilla 4.07 [en] (X11; I; Linux 2.0.36 i686) MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: SQL Problem Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I have two tables which have exactly the same structure. Both of them have one datetime column along with three other columns. But the datetime column value in the second table is NULL for all the rows. Now I want select the least date(date with the least value in the datetime column) from the first table and update all the rows in the second table with this least date value from the first table. I do not want to use any compiler or host variables. I should be able to do this only using SQL statements. Cn somebody please help me? Thanks in advance. regards Imtiaz