Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Trying to get birthdays between dates

Javier PApr 13 2020 — edited Apr 13 2020

Hi,

Am trying to get the birthdays withing a period of time.

Having two dates I would like to get the ones whose birthdays are within that period no matter the year.

Select

    name,

    dob,

From Customers

where extract(day from dob) || '-' || extract(month from dob) = extract(day from date1) || '-' || extract(month from date2)

  order by 1

How can I construct the query?

Thanks for the help!

This post has been answered by BrunoVroman on Apr 13 2020
Jump to Answer
Comments
Post Details
Added on Apr 13 2020
14 comments
673 views