Delete rows using datastage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
yiminghu
Participant
Posts: 91
Joined: Fri Nov 14, 2003 10:09 am

Delete rows using datastage

Post by yiminghu »

Hi,

I am doing a project converting stored procedure to datastage. I am wondering whether you can use datastage to delete rows, here is the original sql statement.

DELETE FROM IN_PLAYER_MASTER
WHERE
Acct IN (Select Player_Acct_Num FROM EXD_PLAYER_MASTER )

I was trying to use user-defined SQL, but when I executed the job, I got bouch of warnings.

Any suggestions? Or using stored procedure is my only choice.

Thanks,

Yiming
jseclen
Participant
Posts: 133
Joined: Wed Mar 05, 2003 4:19 pm
Location: Lima - Peru. Sudamerica
Contact:

Re: Delete rows using datastage

Post by jseclen »

Hi Yiming,

What kind of database use???

Can you explain how is and work your job ???

8)
Saludos,

Miguel Seclén
Lima - Peru
Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Re: Delete rows using datastage

Post by Teej »

Oh. You were doing just one stage, I suspect?

Do this:

2 database stages:

[input] -> [output]

For Input: Select [field] from [table]

For output: Delete from [table] where [field] = [input column]

-T.J.
Developer of DataStage Parallel Engine (Orchestrate).
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Just run this as a sql script from either a BATCH job using DSExecute or from a command stage. Use the appropriate command line syntax for your unspecified database. If Informix, use dbaccess. If Oracle, use sqlplus. If SQL-Server or Sybase, use isql. If DB2, well, someone give that answer. :oops:
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
yiminghu
Participant
Posts: 91
Joined: Fri Nov 14, 2003 10:09 am

Re: Delete rows using datastage

Post by yiminghu »

Thanks, everybody. The problem has been resolved. I made a typo in the SQL statement.
Post Reply