From: | Peter Eisentraut <e99re41(at)DoCS(dot)UU(dot)SE> |
---|---|
To: | "Imtiaz(dot) S(dot) M" <imtiaz_sm(at)yahoo(dot)com> |
Cc: | pgsql-sql(at)postgreSQL(dot)org |
Subject: | Re: [SQL] SQL Problem |
Date: | 1999-10-28 10:58:29 |
Message-ID: | Pine.GSO.4.02A.9910281257210.567-100000@Puma.DoCS.UU.SE |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
UPDATE second_table SET date_column = (SELECT min(date_column) FROM
first_table);
On Thu, 28 Oct 1999, Imtiaz. S. M wrote:
> 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
>
>
> ************
>
>
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From | Date | Subject | |
---|---|---|---|
Next Message | Dirk Drechsel | 1999-10-28 11:01:33 | Change of a field in a table |
Previous Message | Imtiaz. S. M | 1999-10-28 10:47:03 | SQL Problem |