hi guys i am firing this user defined query in my target database it needs to update only one column and insert new rows
UPDATE dwhd004.DWH_ARR_RATE_REL SET END_DT=CURRENT_DATE WHERE START_DT=? and arr_id_acct=?;
INSERT INTO dwhd004.DWH_ARR_RATE_REL (ARR_ID_ACCT,START_DT,RI_ID_SRCE_SYS,EFF_RATE_PCT,INT_NET_EFF_RATE,INT_CEIL_RATE,INT_FLOOR_RATE,INT_TRNSF_RATE,INT_RPRC_SPRD_RATE,INT_RPRC_IDX_RATE,INT_CURR_RATE,FUND_CHRG_RATE,BASIS_POINT_NUM,RATE_CLASS_LCL_CDE,RATE_CLASS_CDE,INDEX_RPRC_LCL_CDE,INDEX_RPRC_CDE,ACCR_BASIS_LCL_CDE,ACCR_BASIS_CDE,ACCR_FUND_CDE,RATE_TEXT,END_DT,ACCR_FUND_LCL_CDE,PRD_CEIL_RATE_PCT,PRC_FLR_RATE_PCT) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);
and iam getting the following error
no_jndsjLodLoanArrAfs..UDB_DWH_ARR_RATE_REL_lod: [IBM][CLI Driver] CLI0100E Wrong number of parameters. SQLSTATE=07001
SQLExecDirect: Error executing statement 'UPDATE dwhd004.DWH_ARR_RATE_REL SET END_DT=CURRENT_DATE WHERE START_DT=? and arr_id_acct=?'. See following DB2 message for details.
no_jndsjLodLoanArrAfs..UDB_DWH_ARR_RATE_REL_lod.DSLink1: DSP.Open GCI $DSP.Open error -100.
update insert problem
Moderators: chulett, rschirm, roy
A quick cut and paste of your statement shows it has 48 commas, so that would mean that you ought to have 24 column; but only 15 of those are in your value fields. So it would seem your columns and placeholds don't add up to the same number, which is also what the error message states.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
However, it's grumbling about the UPDATE statement. Wrong number of parameters suggests that, while you have two columns in your WHERE clause, there are more than two - or only one - identified as Key in your metadata (the columns grid). Or, perhaps, that either START_DT or arr_id_acct are not columns in this table, or dwhd004.DWH_ARR_RATE_REL can not be found as a table. I take it CURRENT_DATE is a legitimate constant (not SYSDATE?) in your brand of SQL?
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.