var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Update a blank date column to be a year later and on the next sunday
think this is a tricky one or now.. as it maybe
i have similar to the following
ACC_NO FROM_DATE TO_DATE
i need to set the to date to be a year later and the next sunday
eg one year on from the 05.10.05 would land on a thursday. so i need to set it tobe the sunday date which would be the 8th.
but leave it alone if it is already a sunday?
confusing !! hehe
This will do it:
im fresh to sql so dont hit me with a stick..
can you explain how that works?
Working from the inside outwards:
1) Move forward 12 months from a date:
x := add_months(from_date,12)
2) Go back one day:
y := x-1
3) Move forward to next Sunday:
Step 2 is required because the NEXT_DAY function always moves forward, even if the date argument is already a Sunday.