Error with Create table in Oracle Database

I tried to use an Execute Non Querry activity for creating a table in Oracle database.
The syntax in my querry is:

“Create table TABLE_NAME as
Select …

And the error looks like this: [ORA-01036: illegal variable name/number]

I mention that the part with union without create table in an Execute Querry activity is working.
Can you help me please?

welcome to uipath community
have we used any variables inside the sql statement here in uipath
if so we need to mention it with @ in front like this @variablename

Cheers @CristinaAlina

Hello! I have no variables inside the querry, just a parameter as an input of a condition, the name of the table i hard code it simple like :

Select distinct
WHERE t1.Data_id = :param
AND t1.JOB = t2.JOB

I tried to create a variable with the name of the table and introduce it with @variable_name, and give it the default value:“ROBOT_TABLE1”, but it didn’t work, it shows the same error. What can i do? :frowning:

I came back with the solution :smile::blush: !
You can format the string before with Assign where you put a variable that will take the string value of the query with the parameter you wanted in him. Important that the variable you use for the parameter role to not be used anywhere but there! (in my case, :param ) After you do that, use Replace activity to replace the “parameter” with the variable, implicitly the value that you want, and after that, use the string variable of formatted text in the Execute Non Query activity :+1:

In this mode, you use the variable that you want inside the Non Query activity, and you don’t even need to use officially the implicit parameter.

Cheers :beers:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.