I need to execute a bunch of SQL Statements.
(There are some truncate statements and some delete statments)
target is Oracle db.
what is the best way to execute the bunch of sql statements?
what i tried is:
DummySeq_File-->X-->DRS_Stage
one column i mentioned as a dummy value
and update action:User defined SQL
and used bunch of sql statements.
but its throwing exception:column name invalid identifier.
thanks
Thanks
executing a bunch of SQL Statements
Moderators: chulett, rschirm, roy
mystuff - could you post the SQL that is causing the error message you listed?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
There's no way you can execute "a bunch" of different sql statements from a single link, you won't be able to bind everything properly to the columns in the stage. Which is exactly what your error says happened.
For something like that, I'd suggest a script via sqlplus. Or put them in a proc.
For something like that, I'd suggest a script via sqlplus. Or put them in a proc.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
chulett wrote:There's no way you can execute "a bunch" of different sql statements from a single link, you won't be able to bind everything properly to the columns in the stage. Which is exactly what your error say ...
As Chulett says you cannot execute multiple sql statements in user-defined sql. User-defined sql to write only a single query big or small.
Regards
Sreeni
-
- Premium Member
- Posts: 385
- Joined: Wed Jun 16, 2004 12:43 pm
- Location: Virginia, USA
- Contact:
If your SQL statements really have nothing to do with the row you are passing to the DRS stage, then do not pass any rows. Set the output constraint to @FALSE, and put you SQL statements on the after SQL tab.
Chuck Smith
www.anotheritco.com
www.anotheritco.com
No stages. Scripts.
DSExecute a sqlplus script with your 'bunch' in it from the Job Control tab. Or run them one at a time so that each can log their individual runtimes plus success or failure into the job's log. You can even wrapper them with DSLogInfo calls to be more verbose...
Running script 1...
Script 1 execute successfully.
Running script 2...
Etc.
DSExecute a sqlplus script with your 'bunch' in it from the Job Control tab. Or run them one at a time so that each can log their individual runtimes plus success or failure into the job's log. You can even wrapper them with DSLogInfo calls to be more verbose...
Running script 1...
Script 1 execute successfully.
Running script 2...
Etc.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers