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!

How to find the last date occurrence by passing the weekday

3483740Mar 24 2020 — edited Mar 24 2020

Thanks in advance..

I have been really struggling to find the last date occurrence by passing the weekday, example :

I have a column in my table which holds any of the below weekday value :

MON

TUE

WED

THU

FRI

SAT

SUN

Now I want another column to show the last occurrence date of that week day.

Example 1 : Query running as of 24th Mar 2020 for the value 'FRI' should give me the result "20-Mar-2020"

Example 2 : Query running as of 24th Mar 2020 for the value 'WED' should give me the result "18-Mar-2020"

Thanks,

Pavan

Comments
Post Details
Added on Mar 24 2020
8 comments
324 views