to be picky, if dob can be empty or null then
where !empty(dob) and !isnull(dob) and
( DATE( YEAR( ldStart ), MONTH( dob ), DAY( dob ) ) BETWEEN ldStart AND ldEnd
OR
DATE( YEAR( ldEnd), MONTH( dob ), DAY( dob ) ) BETWEEN ldStart AND ldEnd)
>Try
>
>SELECT * FROM theTable
> WHERE
> DATE( YEAR( ldStart ), MONTH( dob ), DAY( dob ) ) BETWEEN ldStart AND ldEnd
> OR
> DATE( YEAR( ldEnd), MONTH( dob ), DAY( dob ) ) BETWEEN ldStart AND ldEnd
>
>>I am sure this has been discussed before, but I never paid much attention to the issue... until now, when I need it.
>>
>>From a list of people with birth dates, how do I find out who has a birthday within a certain range of dates - e.g., the current week?
>>
>>I could write some kind of loop, or complex logic, but I suspect there must be some easier way.
>>