If I understand correctly, you want to select on a specific month of
birth that is 13 years prior to a month provided as a starting point.
create table Born (Name varchar(20), dob datetime)
INSERT Born values('Nancy', '19940704')
INSERT Born values('Ralph', '19940804')
INSERT Born values('Edgar', '19940904')
declare @d datetime
set @d = '20070801'
SELECT @d, *
FROM Born
WHERE DATEDIFF(month,dob,@d) = (13 * 12)
DROP TABLE Born
Roy Harvey
Beacon Falls, CT
>Hi experts,
>
[quoted text clipped - 33 lines]
>Regards
>Dinesh
Dinesh - 31 Aug 2007 09:17 GMT
> If I understand correctly, you want to select on a specific month of
> birth that is 13 years prior to a month provided as a starting point.
[quoted text clipped - 56 lines]
>
> - Show quoted text -
Thanks Roy Harvey
Yes for your reply. I got my solution with your help.
Regards
Dinesh