Complicated query

Hello everybody .

I want to run a complicated query that was created in Access.

Any ideas?

"SELECT CLTNUM, [L400 out 202001].LINSNAME, Sum([L400 out 202001].ZRSVAMT) AS SumOfZRSVAMT, 50000 AS Retention, CDbl([SumOfZRSVAMT]-[Retention]) AS ceded, [L400 out 202001].CRTABLE
FROM [L400 out 202001]
WHERE ((([L400 out 202001].ZCNTTYP) In (“ΖΩΗ”,“UL”)))
GROUP BY [L400 out 202001].CLTNUM, [L400 out 202001].LINSNAME, 50000, [L400 out 202001].CRTABLE
HAVING (((Sum([L400 out 202001].ZRSVAMT))>50000) AND (([L400 out 202001].CRTABLE) In (“SP01”,“SP02”,“SP03”,“SP04”,“TT01”,“TT02”,“TT03”,“TT04”,“TT05”,“TT06”,“TWL2”,“UL03”,“UL05”,“UL90A”,“U90B”,“U92B”,“U92B”,“U93B”,“U93B”)));

This article should help https://www.uipath.com/kb-articles/how-to-query-data-from-sql-database . You can get these activities from the UiPath.Database.Activities package.

Hey @Anthony_Humphries !
I want to query from a datatable that I have created before!

This is possible as long as the table you created is persistent (i.e. the table is not a temp table). You’ll need to have your query reference the table you’ve created.

@Anthony_Humphries How do I create a persistent table?

Could you please give advice on the steps?