View previous topic :: View next topic
|
Author |
Message |
Surya Kira nPasumarthi
New User
Joined: 21 Nov 2007 Posts: 19 Location: hyderabad
|
|
|
|
Hi,
I am trying to write a Coorealted subquery to update the description of a table column using below query:
update picsh_ms_loss loss
set loss.loss_desc = (select CASE C.LOSS_DESC_CODE
WHEN '481' THEN 'DUE TO TORNADO'
WHEN '482' THEN 'DUE TO APPLIANCE FAILURE'
WHEN '483' THEN 'DUE TO PLUMBING FAILURE'
WHEN '485' THEN 'DUE TO ICE DAM'
FROM TPLCC2.COM_CLAIMS C , TPIX15.PICSH_MS_POLSTAT P,
TPIX15.PICSH_MS_LOSS L
WHERE C.CLAIM_NO = L.CLAIM_NO
AND L.CLAIM_NO <> ' ' AND L.LOSS_DESCR_30 = ' '
AND P.STATUS_CODE IN ('A' , 'R')
AND P.POL_NUM = C.POLICY_NO
and loss.policy_ref_num = p.policy_ref_num
and loss.claim_no = c.claim_no)
when i am trying to excute the above query,
I am getting an error with sqlcode = -4700
DB2 ATTEMPT TO USE NEW FUNCTION BEFORE NEW FUNCTION MODE.
Please let me know, if there is any error in the above query.
Thanks in advance.
Thanks,
SK |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
The primary error is that you are trying to use a new function before it has been activated. Talk to your DBA about it. |
|
Back to top |
|
|
vini_srcna
Active User
Joined: 26 May 2005 Posts: 178 Location: Copenhagen, Denmark
|
|
|
|
Which version of DB2 are you using.???. I guess this error message comes on DB2 V8 Compatible mode.
Are you running on V8 CM.?? |
|
Back to top |
|
|
|