Hi,
We have a job that has one ODBC as input a transformer and then 2 ODBC's as output and 1 DB2_UDB_API as output. Th columns bein fed to the failing stage are CNTR_NO char(6) and CNTR_LENGTH Integer. The job is failing on the DB2_UDB_API stage with:
DB2_UDB_API_63,0: Warning: GPFRI_CNTRCT_RULE_002_JPtest.DB2_UDB_API_63: [IBM][CLI Driver][DB2/AIX64] SQL0206N "ORCHESTRATE.CNTR_LENGTH" is not valid in the context where it is used. SQLSTATE=42703
We are trying the User defined SQL:
UPDATE PRFWSTG.GPFRI_DATA A
SET A.USG_CD = 'N',
A.RSN_CD = '02'
WHERE
(RIGHT(A.CNTR_NO,ORCHESTRATE.CNTR_LENGTH) = ORCHESTRATE.CNTR_NO);
I am attempting to help out a developer in our shop and thought by specifying Orchestrate in his SQL it would resolve his issue.
I then tried
UPDATE PRFWSTG.GPFRI_DATA A
SET A.USG_CD = 'N',
A.RSN_CD = '02'
WHERE
RIGHT(A.CNTR_NO,6) = ORCHESTRATE.CNTR_NO;
and I received a similar error for ORCHESTRATE.CNTR_NO:
DB2_UDB_API_63,0: Warning: GPFRI_CNTRCT_RULE_002_JPtest.DB2_UDB_API_63: [IBM][CLI Driver][DB2/AIX64] SQL0206N "ORCHESTRATE.CNTR_NO" is not valid in the context where it is used. SQLSTATE=42703
The following worked:
UPDATE PRFWSTG.GPFRI_DATA A
SET A.USG_CD = 'N',
A.RSN_CD = '02'
WHERE
RIGHT(A.CNTR_NO,6) = CNTR_NO;
My question is how can we pass the value of CNTR_LENGTH coming in from the link to the Right function (instead of the hard coded 6 that worked)?
Thanks - - John
UDB error trying to do an Update
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 306
- Joined: Wed Jun 21, 2006 11:41 am
-
- Premium Member
- Posts: 306
- Joined: Wed Jun 21, 2006 11:41 am