dbiswas
(DEBABRATA BISWAS)
June 20, 2018, 7:14pm
1
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
OR
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.
Rammohan91
(Rammohan Banda)
June 20, 2018, 7:22pm
2
Not sure if it would work, but try using Query like this:
(“select * from table1 where empid = :”+ empNames)
Thanks,
Rammohan B.
dbiswas
(DEBABRATA BISWAS)
June 20, 2018, 7:30pm
3
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
Rammohan91
(Rammohan Banda)
June 20, 2018, 7:35pm
4
Gotcha. Check this once if it helps,
Can you share a screenshot of the var1 variable, the sql query, and the input paramaters?
You could pass from the datatable exactly, but it needs to be a single item, not the entire table. So the value in the input paramaters would be something like datatable.rows(index).item(“ColumnName”).ToString with the direction=In and the Type=string
Here’s an example of a query I’m using. PreviousBusinessDay is a datetime variable in the workflow, and I’m passing it as an input parameter in the query
[…
Thanks,
Rammohan B.
Parametros do no oracle, precisam estar entre aspas simples.
Ex: