how to resolve -811 sqlcode .give clear explaination
Answer Posted / sesha
-811 results when
1)Execution of an embedded SELECT statement has resulted in
a result table containing more than one row.
2)Alternatively, a subquery contained in a basic predicate
has produced more than one value.
Solution is:
Examine the syntax of the statement to ensure that it
contains the proper condition specifications. If it does,
there may be a problem with the data that is causing more
than one row or value to be returned when you do not expect
it.
You can use cursor to overcome this problem.
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is the difference between oracle and db2?
Explain the contention situations caused by locks?
Which components manage deadlocks in db2?
What is the physical storage length of the data types date, time, and timestamp?
What is meant by union and union all?
What does reorg do in db2?
What is ibm db2 database?
Define predicate?
Highlight all the advantages that are attached to a package.
SET is the ANSI standard for variable assignment, SELECT is not. SET can only assign one variable at a time, SELECT can make multiple assignments at once. If assigning from a query, SET can only assign a scalar value. If the query returns multiple values/rows then SET will raise an error. SELECT will assign one of the values to the variable and hide the fact that multiple values were returned (so you'd likely never know why something was going wrong elsewhere - have fun troubleshooting that one) When assigning from a query if there is no value returned then SET will assign NULL, where SELECT will not make the assignment at all (so the variable will not be changed from it's previous value) As far as speed differences - there are no direct differences between SET and SELECT. However SELECT's ability to make multiple assignments in one shot does give it a slight speed advantage over SET.
Is db2 a mainframe database?
What is the reason behind not using select * in embedded sql programs?
Hi, i would like to start a new carrier in DB2 DBA.Which and what all step should i have to take..?
what is db2 restart?
What language is db2 written in?