Update table: extract max(hour). - Mailing list pgsql-sql

From T.J.Farrell
Subject Update table: extract max(hour).
Date
Msg-id 000c01bfcd96$cab4d3a0$03b8fac1@oemcomputer
Whole thread Raw
List 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



pgsql-sql by date:

Previous
From: Craig May
Date:
Subject: @@Identity
Next
From: "T.J.Farrell"
Date:
Subject: LIKE vrs ~~