Hi All, I get the following issue while trying to execute sql case statement with excel as data source. - IErrorInfo.GetDescription failed with E_FAIL(0x80004005)
My query is
“select
A.[Id], Case When B.[sId] Is NULL Then ‘New’ Else ‘Existing’ End
from [Current$] A
left Join [Previous$] B On A.[Id] = B.[Id]”
I am just checking if a value of coulmn1 in sheet 1 is available in Column1 of sheet2.
P.S: My production data has 10 columns in each sheet and about 500k records to compare. Existing Vlookup is very slow for business.
Can you change the query as follows and see what happens
“select
A.[Id], Case When B.[sId] Is NULL Then ‘New’ Else ‘Existing’ End AS AvailableStatus
from [Current$] A
left Join [Previous$] B On A.[Id] = B.[Id]”
What i did is just gave a column name to the case statement. Try it out and see whether you still get the error
Ok… so where are you running this script in? In your excel file? I suppose your excel is getting data from a sql database? If so you can directly run the query from uipath database activities
This link is from another site, out of UiPath. But thought of sharing it because this error doesn’t seems to be from UiPath Studio, but from outside of it…
Try out the stuff recommended in the solution there, it might help
We cannot use SQL Case statement while trying to query excel data in Uipath.
Instead Iif(expression,value1,value2) can be used.
“select
A.[sId] as [sID], A.[Screen] as [Screen], A.[Identifier] as [Identifier],
Iif(B.[sId] is Null,‘New’,‘Existing’) as [Status]
from [Current$] A
left Join [Previous$] B On A.[sId] = B.[sId]”