Hi, I have a problem with SQL Query.
So I have to output data from SQL query, but there is a special case.
Normal Case :
select contract_number, end_date
from table_A
where (MONTH(END_DATE)=‘10’ or MONTH(END_DATE)=‘11’ or MONTH(END_DATE)=‘12’) AND (YEAR(END_DATE)>=‘2022’)
order by end_date
using query above, I will output data from October 2022 until December 2022…
Special Case :
select contract_number, end_date
from table_A
where (MONTH(END_DATE)=‘11’ or MONTH(END_DATE)=‘12’ or MONTH(END_DATE)=‘1’) AND (YEAR(END_DATE)>=‘2022’)
order by end_date
- Based on special case, I have to output data from November 2022 until January 2023… Any idea how to do this? I tried to split the month and year as shown below like this and still not working
(MONTH(END_DATE)=‘1’ AND (YEAR(END_DATE)>=‘2023’))
- My assumption after the query is done, I have to filter it again in uipath (the data from January 2022 probably will be queried too). How to remove the whole month unused date (example 1 January 2022 - 31 January 2022) using filter data table?
any help on the query for this special case? Thanks !!