Archives of the TeradataForum
Message Posted: Fri, 21 May 2004 @ 19:15:02 GMT
Using SQL, is there an easy way to advance a DATE value by some number of years, based on CURRENT_DATE?
For example, given a column EXPIRATION_DATE with the value '2002-03-15' (obviously in the past), I want to create a column NEW_DATE with the value '2004-03-15'.
case when EXPIRATION_DATE < CURRENT_DATE then ??? else EXPIRATION_DATE end as NEW_DATE
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|