Hi,
This is Power Automate Desktop.
I'm building a SQL query to grab some data from a large Excel file but I'm struggling with the syntax to filter the data by date.
The query below works as expected and returns my records
SELECT [CSS_DB_Exch], [Exchange Name], [Contractor Number], [Supplier], [Company Name], [Estimate Number and Source], [Actual Work End], [Combined Status], [Programme], [Partner_Man_ORG]
FROM [Latest Data$]
WHERE ([Company Name] LIKE ('%%Civ%%') OR [Company Name] LIKE ('%%Cv%%')) AND ([Combined Status] IN ('X')
When I add and additional filter to the column [Actual Work End] I return zero results.
SELECT [CSS_DB_Exch], [Exchange Name], [Contractor Number], [Supplier], [Company Name], [Estimate Number and Source], [Actual Work End], [Combined Status], [Programme], [Partner_Man_ORG]
FROM [Latest Data$]
WHERE ([Company Name] LIKE ('%%Civ%%') OR [Company Name] LIKE ('%%Cv%%')) AND ([Combined Status] IN ('X')
AND [Actual Work End] BETWEEN #01/04/2022# AND #10/10/2022#)
I've tried multiple different ways to write the date filter
[Actual Work End] = '17/06/2022' - No results
[Actual Work End] > '17/06/2022' - Brings back all results
[Actual Work End] > #17/06/2022# - Brings back all results
[Actual Work End] BETWEEN #17/06/2022# AND #27/06/2022# - No results
[Actual Work End] BETWEEN #01/04/2022# AND #08/10/2022# - No results
[Actual Work End] BETWEEN #04/01/2022# AND #10/08/2022# - No results
[Actual Work End] BETWEEN '04/01/2022' AND '10/08/2022' - No results
The Excel column is formatted as a Date column
Any help appreciated