Subqueryes

Поиск
Список
Период
Сортировка
От Ezequias R. da Rocha
Тема Subqueryes
Дата
Msg-id 46028915.1030102@fastcon.com.br
обсуждение исходный текст
Ответы Re: Subqueryes
Re: Subqueryes
Список pgsql-sql
Hi list,

I must add some days (i.e:365) to my current_date and put it in my table 
(an UPDATE). By now, it is simple but my "days to add" is in another table.

How could I do this kind of update

My sql is like this (but is not working):

update myTable
set date = (current_date + (Select daysToAdd from base.Table1 where 
myFKey_id = Table1Id) )
where Expire_Date = now()::Date;


-- 
Atenciosamente
Ezequias Rodrigues da Rocha



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

Предыдущее
От: Susan Evans
Дата:
Сообщение: unsubscribe
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Subqueryes