How can i run db2 delete sql from a job ?
I have tried to use DB2 stage with peek stage where i have used user defined sql as:
SELECT TYPE FROM SYSCAT.TABLES fetch first 1 rows only;
and in 'BEFORE SQL' im using:
Delete from tbl1 where dttm='2008-01-04 01:00:00' as parameter. It gives me the following error:
db2command,0: Warning: db2command: SQLExecDirect: Error executing statement 'DELETE from sch1.tbl1 WHERE dttm = €8-09-06 18:23:44.0 '. See following DB2 message for details.
Run DB2 Delete sql in a job
Moderators: chulett, rschirm, roy
So... the entire sql statement is passed in as a parameter? That should be fine, just wanted that clarified. However, are you saying that even putting the sql statement in as-is (with any parameterization) gets you the same error?
Have you posted the entire set of messages this error generates, including any 'following DB2 message' that was logged?
![Confused :?](./images/smilies/icon_confused.gif)
Have you posted the entire set of messages this error generates, including any 'following DB2 message' that was logged?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Your string pad character is set to 0x00 (its default value) but your DB2 is objecting to a fixed-length string (that is, a Char data type) being padded with this character. Explicitly pad the string with space or some other valid character, or change APT_STRING_PADCHAR.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.