Update latest column in master table from transaction table

Поиск
Список
Период
Сортировка
От Arvind Singh
Тема Update latest column in master table from transaction table
Дата
Msg-id BLU164-W48177FDA355AF82B9046C1CA660@phx.gbl
обсуждение исходный текст
Ответы Re: Update latest column in master table from transaction table  (Igor Romanchenko <igor.a.romanchenko@gmail.com>)
Список pgsql-general
hello,
 
i have two tables
customer_master
> cname
> lastreceiptdate
> lastreceiptamt
accounts
> cname
> date
> amount
 
i need help in constructing a single update query. where the customer_master table is updated with the latest receipt date and receipt amount for a single customer code (cname like "FRUITXXXXX") from accounts table
 
so far we are using a select command to retrieve a record with max(Date) and then using another update command to update using results from the select query.
 
thanks

 

В списке pgsql-general по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: role does not exist
Следующее
От: Yvon Thoraval
Дата:
Сообщение: PostgreSQL and IPV6