Update table: extract max(hour).

From: "T(dot)J(dot)Farrell" <T(dot)J(dot)Farrell(at)wanadoo(dot)fr>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Update table: extract max(hour).
Date: 2000-06-03 20:02:43
Message-ID: 000c01bfcd96$cab4d3a0$03b8fac1@oemcomputer
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

I am trying to update one table based on another table data as follows:

TableStatus containts fields date (date), hour
(time), IDcode (text), status (text).
TableProduct contains fields state (text),
datestate (date), IDcode (text).

I want to update state and datestate based on the last status in
Tablestatus.
The problem is that I cannot extract a max(hour) from PG, and using
max(date) is not sufficient, as 2 status could be entered on the same day on
two different times.

I am unsure how to resolve this problem.
TIA

Browse pgsql-sql by date

  From Date Subject
Next Message T.J.Farrell 2000-06-03 20:31:07 LIKE vrs ~~
Previous Message Craig May 2000-06-03 09:26:12 @@Identity