Saturday 28 September 2013

How to determine birth week in current year for 7 day coupon

How to determine birth week in current year for 7 day coupon

I am trying to get my customers birth dates, but with the current
year(sysdate). For example, John Brown was born in 01-JAN-65, I would like
to create a query that retrieves the previous Monday and next Sunday from
John's birthday, so that the customer can see that their coupon is valid
between that time seven day time frame. So for John Brown, the row would
have three columns
FullName, Monday, and Sunday and the data would be John Brown 31-DEC-2012
06-JAN-2013
My table definition is: Table Name - Customers Columns Customer_ID
First_Name Last_Name DOB Phone
I have read Oracle Database 11g's chapter 5 "Storing and Processing Dates
and Times", but did not find a solution to my problem. Please help, thank
you.

No comments:

Post a Comment