
Hi ,
I'm trying to run a sql query in power automate and update a sharepoint list.
Query is:
Select sJobID,sJobQuickDesc, sContactEmail,emp.Name from tblsv_job job
left join tblSystem_Employee emp on emp.EmployeeID = lOwnerID
left join tblsv_activity act on act.lJobID = job.lJobID
where CAST(dtClosed AS DATE) = CAST(GETDATE() AS DATE) and iLineType <= 1
dtclosed is a datetime field . convert this to date field and check if equal to todays date.
The conversion doesnt work. Gives me a syntac error. ALso, How do i use the joins with other tables in get rows action?
any help is much appreciated.
Cheers,
Create a view on your SQL server that has your query logic, and then use the "Get Rows" action against the view. No need for extra filters.