Page 1 of 1

noticed that Robotask support oracle sql?

Posted: Wed Jan 09, 2019 9:52 am
by helenharry
Hi, I'm trialing this program and noticed that Robotask support oracle sql? my query for oracle doesn't seem to work:
spool C:\Users\VM\Desktop\QueryExport\data.csv
select DEPTNO from DEPT

1. Can someone please confirm if Robotask doesn't support Oracle SQL
2. What would be the appropriate way to write the query above?

Thank you in advanced! :)

Re: noticed that Robotask support oracle sql?

Posted: Wed Jan 09, 2019 10:34 am
by Oleg
Yes, RoboTask supports Oracle Database. But RoboTask uses Windows™ ADO engine to access data (not directly through native Oracle client).
The command SPOOL is not SQL command. Also your expression contains two commands: SPOOL and SELECT
It seems you want to export data from SQL query to CSV file.
You can write simple task to do this
Look at my simple example

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|444033236
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Task532"
Hide=INTEGER|0
ID=INTEGER|1591169541
LogOnAsUser=INTEGER|1
Name=STRING|"Write data to CSV"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER

[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""CSV_FILE"" with value ""C:\Users\VM\Desktop\QueryExport\data.csv"""
Params=FOLDER

[Actions\Action1\Params]
expand=STRING|"0"
varname=STRING|"CSV_FILE"
varvalue=STRING|"C:\Users\VM\Desktop\QueryExport\data.csv"

[Actions\Action2]
ActionID=STRING|"A_LOOP_DATASET"
Enabled=INTEGER|-1
Name=STRING|"Dataset Loop"
Params=FOLDER

[Actions\Action2\Params]
commatext=STRING|"0"
connectionstring=STRING|"Provider=MSDAORA.1;User ID=scott;Data Source=Myserver;Persist Security Info=False;password=tiger"
override=STRING|"0"
paramcount=STRING|"0"
password=STRING|"1928821129195921933620110"
sql=STRING|"""select DEPTNO from DEPT"""
timeout=STRING|"60"
var2=STRING|"FIELDS"
withmemo=STRING|"0"

[Actions\Action3]
ActionID=STRING|"A_FILE_TEXTWRITE"
Enabled=INTEGER|-1
Name=STRING|"Create text file {CSV_file}"
Params=FOLDER

[Actions\Action3\Params]
encode=STRING|"0"
fileexists=STRING|"1"
filname=STRING|"{CSV_file}"
line0=STRING|"{Fields}"
linecount=STRING|"1"
suppress=STRING|"1"

[Actions\Action4]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"

Save the text of the task to a file and use menu Task->Import to import the task into RoboTask.