DELETE statement in ODBC stage.

Archive of postings to DataStageUsers@Oliver.com. This forum intended only as a reference and cannot be posted to.

Moderators: chulett, rschirm

Locked
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

DELETE statement in ODBC stage.

Post by admin »

Hi!

I use a delete statement in an ODBC stage with user-defined SQL. The job compilation and validation are OK. At runtime I get this error:

TEST2LoadVehEvntDts.VehHist_To_VehEvntDtsInsOrUpd.In_VehEvntDtsIns:
DSD.BCIPut call to SQLExecute failed.
SQL statement:DELETE FROM WRK.T_VEHICLE_EVNT_DTS WHERE (VEHICLE_NBR = ? AND EVNT_SEQ_CNT = ?);

When I try the update action Replace existing rows completely , DataStage generates the delete statement immediateliy followed by the insert statement. There is no problem when I run this, but I dont need the insert statement because I only want to remove some rows. So I copied the Delete statement of this generated SQL and I only have the VEHICLE_NBR and EVNT_SEQ_CNT fields in the mapping logic of the target stage. The mapping of the data looks fine and there is no syntax error, the column names are spelled correctly,....

Cant you use the DELETE statement without any other statement in an ODBC stage?

When I use the DB2UDB-plugin (update action Delete existing rows only) this works fine, but I prefer to use the ODBC stage.

DataStage v4.1
UDB V7

Thanks! Regards,
An
Locked