var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: error while selecting
I am executing below stmts inside a procedure
DECLARE USRID INTEGER;
SET USRID=(select usrid from pq5.incdnt_all where INCDNT_ID=Incdnt_ID);
But it is throwing below error
Value of output parameters
Parameter Name : SQL_ERROR_CD
Parameter Value : -811
Parameter Name : APP_ERROR_CD
Parameter Value : 500
incdnt_is is the primary key of the table.
Plz help me resolve this issue.
the -811 states that the select statement is returning more than one row. You need to alter your select conditions so that you only get a single row returned.
From where came INCDNT_ID and Incdnt_ID?
DB2 is not case sensitive.
So, both might be considered column of table pq5.incdnt_all.
Add prefix with table name and your procedure name, like this...
incdnt_all.INCDNT_ID = procedure-name.Incdnt_ID
Or, correct the names.
Another consideration is where do you use USRID?
If it is used in where clause in another select statement(or cursor), it might be worth to consider to include the scalar-subselect into the select statement(or cursor).