Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Returning records based on dob field 1

Status
Not open for further replies.

JSMITH242B

Programmer
Mar 7, 2003
352
GB
Hi Group,

I need to return records where the age of a person is less than 11.
I have a dob field in my table which I can use with the Now function to return the desired results but I have a problem with defining the SQL statement using this.

Any help much appreciated.
 
Something like this might do

Code:
select * from mytable
where datediff(yy, DOB, getdate()) < 11


"I'm living so far beyond my income that we may almost be said to be living apart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top