View previous topic :: View next topic
|
Author |
Message |
lanand_hps
New User
Joined: 05 Dec 2007 Posts: 82 Location: chennai
|
|
|
|
Hi,
I've a query which is resulting in -811 althought there is only one record in the database.
I've checked the WHERE clause lot of times and made sure the DB2 sub system is correct. If i delete the record and process the next record, it still abends with -811. The program is processing first say 100 records perfectly and is giving -811 for all the records after that.
Please comment.
Thanks. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Anand,
Try executing the same in SPUFI and see if you're getting multiple rows. |
|
Back to top |
|
|
lanand_hps
New User
Joined: 05 Dec 2007 Posts: 82 Location: chennai
|
|
|
|
I've executed them. It gives only one row. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
-811 THE RESULT OF AN EMBEDDED SELECT STATEMENT OR A SUBSELECT IN THE
SET CLAUSE OF AN UPDATE STATEMENT IS A TABLE OF MORE THAN ONE ROW,
OR THE RESULT OF A SUBQUERY OF A BASIC PREDICATE IS MORE THAN ONE
VALUE
Explanation:
Execution of an embedded SELECT statement or a subselect in the SET clause of an UPDATE statement has resulted in a result table that contains more than one row. Alternatively, a subquery contained in a basic predicate has produced more than one value.
System Action:
The statement cannot be executed.
Programmer Response:
Examine the syntax of the statement to ensure that it contains the proper condition specifications. If the statement syntax is correct, there might be a problem with the data that is causing more than one row or value to be returned when you do not expect it.
SQLSTATE:
21000 |
the manual is clear and does not give any escape routes....
no offense meant, but I' d rathe trust more DB2 and the manual
You think that the query used inside the program is the same one used
in SPUFI...
but often there are gotchas, and what happens inside a program is not what You think... |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
continuation of my previous post..
general consideration ...
using SPUFI what You see is what You get
- no host variables, the values of the where clause are there as constants
inside a program...
well the name tells "host variables" and the content is not always what You would expect...
put displays to see the value of the host variables and You might have big surprises
that' a standard debugging approch, when everything else fails
- no need to be told on a forum |
|
Back to top |
|
|
|