How can i create a table in a Oracle Database?

Hello!

I tried to create a table for my Oracle SQL Developer in UiPath Studio, and it doesn’t work with my query in Execute Non Query activity.
My query looks like this:

CREATE TABLE ROBOT_TABLE AS
SELECT DISTINCT t2.ID IN
FROM TABLE1 t1,
TABLE2 t2
WHERE t1.REEL in (‘00000B’)
AND t1.JOB = t2.JOB
AND t1.PROCESS_STEP = t2.PROCESS_STEP
AND t1.START <= t2.IN
AND t1.END >= t2.IN
UNION
SELECT DISTINCT t2.ID IN
FROM TABLE1_HIS t1,
TABLE2_HIS t2
WHERE t1.REEL in (‘00000B’)
AND t1.JOB = t2.JOB
AND t1.PROCESS_STEP = t2.PROCESS_STEP
AND t1.START <= t2.IN
AND t1.END >= t2.IN

The error that appears is: Execute Non Query: ORA-01036: illegal variable name/number
Can you help me please with the syntax of creating table or with that error? I don’t know what i do wrong.

Dear @CristinaAlina ,
Did you tried to create manually in your Oracle SQL Developer.
If your are able to create Manually then issue with uipath activities.
if you are not able to create manually the you need to check your Query.

as i see error “ORA-01036: illegal variable name/number” is related to Oracle

In Oracle is working, but i want something automatically, because this table i will use it in others…and at the final of flow i will drop them all.
The Reel that i put it as a filter… will be a parameter that will be taken as an input for the flow.
I didn’t figure it out what i do wrong in this query, because if i wrote something simple like “Create table as (Select * from table_name)” is working. :frowning:

I discovered the problem… the error is from parameter… i think the Oracle can’t interpret it …or maybe the parameter it doesn’t take the value i give it to him… i need to figure it out what solution i can take to put a condition on REEL name.

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.

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