1

Currently I am running a script in sqldeveloper to get my data from oracle and dump into CSV file and then I import CSV file into SQL Server. Now, I have VS 2017 and I am trying to get same data into SQL server from Oracle database through Attunity driver.

I could connect oracle database using Oracle Source in data flow but at this point I am stuck, I don't know how to run my existing script which has multiple multiple SQL commands - in first line I alter my session to point to correct schema followed by setting some variables, environment setting and select statements.

Dale K
  • 25,246
  • 15
  • 42
  • 71
mak101
  • 147
  • 1
  • 11

1 Answers1

0

Since you didn't provided the SQL command, i will give you some insights:

In the Oracle Attunity Source if you select the SQL Command access mode, you can write any complex SQL Command even if it contains multiple commands but you must be aware that the first select statement that return a result set (not used to set a variable value) will be considered as source.

Possible workaround

If there you are generating data from multiple select statement try using UNION ALL, so all select statement are considered as one command. Or, try inserting all data into a temp table then select data from these table at the end of the whole SQL command.

Hadi
  • 36,233
  • 13
  • 65
  • 124
  • In this particular case I can't do union, I have to run script. Can I run PL-SQL code instead? – mak101 Mar 12 '19 at 18:40
  • The SQL Command must be written with the source engine syntax. I am not sure if it supports all PLSQL functiinalities. You must try it – Hadi Mar 12 '19 at 18:42