'Extract information based on a week number field

I am using Orcle sql developer to access an MSsql database. I have week number field. and I want to extract all information that the week no is equal to the week number of today's date.

Sample Data DutyStaff Address WeekNo Contact John 35thd 15 670956 Peter 25 str 19 706346 Chris 40 odr 20 856294 Adam 7thstr 34 567251 Mary 6thstr 22 702457

I want to extract all rows that have the week number of today. Select * where weekno = (today's week number). The week number of today 12/05/2022 is 19 i.e current day week number



Solution 1:[1]

select * from <table_name> as t where t.week_no = ; will give you all the info specific to the chosen week.

Also; select * from <table_name> as t groupby t.week_no; will group all info pertaining to a particular week as one.

From my understanding, this is what you were asking for, I think.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Adhiraj Chattopadhyay