I use type into activity with the below text(string) and i get that End of expression is expected. Any ideas?
“Select [L400 Out 202001].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”)));”
@the.christopoulos I guess you need to put up Everything in a Straight Line, replace the Double quotes in the query with Single Quotes, Try this :
"Select [L400 Out 202001].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’)));”
@supermanPunch
Now the query in UiPath is without errors , but
when it is typed in access i get the below with part of the text ommited:
"Select .CLTNUM, .LINSNAME, Sum(.ZRSVAMT) As SumOfZRSVAMT, ‘50000’ As Retention, CDbl(-) As ceded, .CRTABLE From Where (((.ZCNTTYP) In (‘ΖΩΗ’,‘UL’))) Group By .CLTNUM, .LINSNAME, ‘50000’, .CRTABLE HAVING (((Sum(.ZRSVAMT))>‘50000’) And ((.CRTABLE) In (‘SP01’,‘SP02’,‘SP03’,‘SP04’,‘TT01’,‘TT02’,‘TT03’,‘TT04’,‘TT05’,‘TT06’,‘TWL2’,‘UL03’,‘UL05’,‘UL90A’,‘U90B’,‘U92B’,‘U92B’,‘U93B’,‘U93B’))); "
You just need to change the double quote at the beginning and at the end.
It’s not likely for the string to be cut off like that. Can you please try check SimulateType on the properties pane?
UPDATE: I noticed that the string does not write anything in the “” square bracket. Never worked with Access SQL, can it be changed with parenthesis instead?
@the.christopoulos Use Type Into Activity, Set Simulate Click To False and Use this Value :
"Select [[L400 Out 202001].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’)));”
I have added an Extra “[” at the start of Each [ , in order to Escape it. Hope this works