How do I pass parameters to Oracle query in execute activity

I am providing a query as below
select * from table1 where empid in (:empNames)

in the parameter i am adding a variable empNames which has value “112233, 112234”

it doesnot return any data.

But if i use one value at a time it works… like this
select * from table1 where empid = :empNames
select * from table1 where empid IN (:empNames)

value of parameter empNames is “112233”

Please help if anyone has success in this.

Note: I can use either :empNames or &empNames to pass parameter in SQL Developer. But UiPath doesnot like the &empNames.

Not sure if it would work, but try using Query like this:

(“select * from table1 where empid = :”+ empNames)

Rammohan B.

Thanks for your reply. Here empName is not a variable in the sequence. it is a paramter in the Execute Query activity. So, if I use it as the syntax provided by you, it gives a compiler error.

(Also, i found that if we use the string concatenation syntax, the SQL needs to be provided as a single line text, it cannot take line breaks.)

1 Like

Gotcha. Check this once if it helps,

Rammohan B.

Parametros do no oracle, precisam estar entre aspas simples.

Ex: image