-
SOLVED
CLOSED
ACTIVE
ANSWERED
- User: chetan
- Posted: on Apr 20, 2020 12:52 AM
- Forum:
SQL Server
- Replies: 3
- Views: 2283
I want to fetch records in such a way that:
Suppose today is Monday then i want to fetch records of Monday and next 2 days ie. Tuesday and wednesday.(Monday+ tuesday and wednesday)
Suppose today is Tuesday then i want to fetch records of Tuesday and next 2 days ie. wednesday and Thursday.(tuesday+ wednesday and thursday)
Suppose today is Friday then i want to fetch records of Friday,Saturday and Monday(here sunday should be skipped)
Suppose today is Saturday then i want to fetch records of Saturday,Monday and Tuesday(here sunday should be skipped)
How to achieve this using sql query or script?