Expire Only Load Jobs

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
JezT
Participant
Posts: 75
Joined: Wed Sep 15, 2004 1:52 am

Expire Only Load Jobs

Post by JezT »

I have created a very simple load job where I am passing a Key field and a date field into a DB2 table. I am simpling wanting to expire any records where the Key ID's are the same and the REC_EDT within the DB2 table is set to '9999-12-31'.

The SQL is as follows:

Code: Select all

UPDATE #pUKDWSCHEMA#.#pTTABLESECARRG# SET REC_EDT=?      
WHERE ARRG_ID=?  AND  REC_EDT = '9999-12-31';
When I run the job I get the following error:
This SQL statement did not contain the same number of parameters as columns on this link. This usually happens with user-defined SQL
Any ideas please ? It is such a simple job that is driving me mad :x :x
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Hello JezT,

What is the category and job name? :D
JezT
Participant
Posts: 75
Joined: Wed Sep 15, 2004 1:52 am

Post by JezT »

In the DEV_75 project

Under jobs/shared/SEC_ARRG

UKWH_SEC_ARRG_IntUpon1job
JezT
Participant
Posts: 75
Joined: Wed Sep 15, 2004 1:52 am

Post by JezT »

In the DEV_75 project

Under jobs/shared/SEC_ARRG

UKWH_SEC_ARRG_IntUpon1job

I have tried the job with a transform stage in the middle but that didn't make any difference
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I didn't recognize the UserId, but I did recognize the pPARAMETER format plus this is the only place I know of with a major field being ARRG_ID. We'll continue this offline. :D
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

But then come back and reveal all.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I was a strange error. Everything in the job looked correct. I made a copy, retyped in the identical manual SQL clause (which was just the default generated UPDATE clause with one added constraint put in) and -poof- the job ran. I couldn't get the original to run and since everything is now in order we've gone on to other things without further attempting to analyze the cause.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If there are two parameter markers in the SQL there must be two columns in the Columns grid. Could someone accidentally have created a column called " "? Columns that are to appear in the WHERE clause of an UPDATE statement must be marked as key, columns that are to appear in the SET clause are not marked as key.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Not in this case; I actually cut-and-pasted the custom SQL from the job that didn't work to my copy of the job and it also worked.
Post Reply