DB2 v7 on Mainframe.
I have procedure:
Code:
create procedure lasrProc.updChNum(in iOrgId integer)
language sql
modifies sql data
no wlm environment
update lasr_org.organisations outerO
set childrennum = (select count(id) from lasr_org.organisations innerO where innerO.parentId = outerO.id)
where id = iOrgId
but when a call it via
Code:
call lasrProc.updChNum(123)
I get sql error SQLSTATE 22503 SQLCODE -188
What's wrong?