SQL Problem

Denmark
June 6, 2007 10:46am CST
Anyone good at SQL? I'm sort of stuck with a problem at work. I work with a huge database with 10s of 1000s of members, and from this database I need to find all members who are 60 years old and then add 8 days to their birthday. The PK is a social security numer like this one 2305532549. First 6 digits being DD-MM-YY. Anyone good at SQL? Please help.
1 person likes this
3 responses
@pc5971 (38)
• Romania
14 Jun 07
I think you can write something like: select * from members where add_months( to_date( substr(to_char(ssn),1,6), 'ddmmyy' ), 60*12 - 100*12) between add_months(sysdate,-12)+1 and sysdate
• Denmark
15 Jun 07
Thanks my solutions is actually near that...
• China
27 Aug 07
first select birthday from table where age between 60 and 69 then oh it's a difficult problem ,I will give you answer later.
@semodders (456)
12 Jul 07
javascript:__doPostBack(vvjavascript:__doPostBack('ctl00$cphMainContent$lbStart','')'ctl00$cphMainContent$lbStart','')