adding years to a date field

Поиск
Список
Период
Сортировка
От Christine Penner
Тема adding years to a date field
Дата
Msg-id 4D9C8CCC.9000508@fp2.ca
обсуждение исходный текст
Ответы Re: adding years to a date field  (Adrian Klaver <adrian.klaver@gmail.com>)
Re: adding years to a date field  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-general
I have to add a number of years to a date field. The years come from another field in the table.

I know I can do this:
select (ii_purchased + interval  '3 year') as date from inventory_item;

But I need to replace the 3 in 3 years with another field from the same table ii_expected_life but I can't seem to do that without getting syntax errors
-- 
Christine Penner
Ingenious Software
250-352-9495
chris@fp2.ca

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

Предыдущее
От: Carlos Mennens
Дата:
Сообщение: Re: Auto Adjust Age
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: temp tables not dropping at end of script