How to pass query from asset to execute query activity

Hi All,

I am getting error while getting query from asset and then trying to execute it.

error

@UiPathMaster,

First try to assign the value of asset to a string type variable and then pass the string variable to the query activity

I did the same, further i found that the query has no double quotes, so i add that.

the same query i am directly passing to execute query activity it is working.

Which version of DB you are trying to query? As per the new DB conditions. the Identifiers cannot accept more than 30 characters. I hope you are aware of that…

Can you try single quotes instead of double…

But the same query is working fine when inserting directly.

thanks.

single quotes will make query invalid

Yeah, That’s my mistake.

Can you try printing the query before entering to the data base query activity and compare with the manual thing you are entering?

And make sure the variable type is same as the required type of input to the activity

yes i am getting the query right, variable type is string.

Can you attach the workflow removing the sensitive information in that so that I can check and get back to you

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

1 Like

image

here sqlQueryNew is the variable which holds the query

@UiPathMaster If the value is having single quotes than you cant insert the values refer here for inserting single quote value.

1 Like

i am not inserting single quotes. i am passing query from asset .