Is there a way to incorporate an IF..then statement in an update SQL statement?
For example if I wanted to update a date in the db, but I wanted the day to remain the same I would use the IF..then statement as follows:
if day(mydate) = day(mydate + 365) then
mydate = day(mydate + 365)
else
mydate = day(mydate + 366)
endif
Any help would be appreciated.
Thanks
For example if I wanted to update a date in the db, but I wanted the day to remain the same I would use the IF..then statement as follows:
if day(mydate) = day(mydate + 365) then
mydate = day(mydate + 365)
else
mydate = day(mydate + 366)
endif
Any help would be appreciated.
Thanks