Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to solve -803

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
ksathishkumar83

New User


Joined: 21 Nov 2006
Posts: 50
Location: India

PostPosted: Wed Jun 13, 2007 10:14 am    Post subject: How to solve -803
Reply with quote

Hi,

I am getting sql code of -803 when inserting a row in to the table.
but there are no entries present in the table.

How to resolve this.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Wed Jun 13, 2007 10:27 am    Post subject: Re: How to solve -803
Reply with quote

what does the fine db2 manual say about it ??
Back to top
View user's profile Send private message
veerababu_p

New User


Joined: 18 Mar 2006
Posts: 5
Location: mumbai

PostPosted: Wed Jun 13, 2007 10:27 am    Post subject:
Reply with quote

Do mean to say table is empty.If your answer is yes.How you are inserting the record?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Wed Jun 13, 2007 10:28 am    Post subject: Re: How to solve -803
Reply with quote

Quote:

Code -803

-803
AN INSERTED OR UPDATED VALUE IS INVALID BECAUSE THE INDEX IN INDEX SPACE indexspace-name CONSTRAINS COLUMNS OF THE TABLE SO NO TWO ROWS CAN CONTAIN DUPLICATE VALUES IN THOSE COLUMNS. RID OF EXISTING ROW IS Xrid
Explanation:

The table that is the object of the INSERT or UPDATE operation is constrained (by UNIQUE INDEX in the INDEX SPACE indexspace-name to have unique values in certain columns. Completion of the requested INSERT or UPDATE would result in duplicate values occurring in row rid.

If a view is the object of the INSERT or UPDATE statement, the table that defines the view is constrained. The update might also be caused by a DELETE operation of a parent row that cascades to a dependent row with a delete rule of SET NULL.
System action:

The INSERT, UPDATE, or DELETE statement cannot be executed. The object table is unchanged.
Programmer response:

Examine the definitions for UNIQUE INDEX in the INDEX SPACE indexspace-name to determine the uniqueness constraint imposed. Please refer to SYSIBM.SYSINDEXES for the indexspace-name and the associated index-name.

For an UPDATE statement, verify that the specified operation is consistent with the uniqueness constraint. If this does not indicate the error, examine the object table to determine the cause of the problem.

For an INSERT statement, examine the object table to determine which values violate the uniqueness constraint. If the INSERT statement contains a subquery, match the contents of the table addressed by the subquery and the contents of the object table to determine the cause of the problem.

For a DELETE statement, examine the index key columns in the table that defines the index. These columns contain a foreign key, which when set NULL on a cascade delete from the object table, causes the duplicate values.
SQLSTATE:

23505
Back to top
View user's profile Send private message
veerababu_p

New User


Joined: 18 Mar 2006
Posts: 5
Location: mumbai

PostPosted: Wed Jun 13, 2007 10:46 am    Post subject:
Reply with quote

How you are inserting the data?
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1534
Location: Andromeda Galaxy

PostPosted: Wed Jun 13, 2007 11:08 am    Post subject:
Reply with quote

Its is -803 because when you are inserting a new row it is trying to insert a duplicate row for the index which is being declared as unique.So you got to change the values.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DB2: How to solve -805 DB2 Sql code trushant.w Mainframe Interview Questions 3 Fri Oct 04, 2013 3:47 pm
No new posts how to solve -904 in cobol db2 program. Escapa DB2 3 Tue Jul 19, 2011 5:34 pm
No new posts Solve file status code 46 Robert Sample COBOL Programming 20 Tue May 04, 2010 4:07 pm
No new posts CSKL:EZY1295E BIND CALL FAILURE.Pleas... tiger_wen CICS 19 Thu Feb 04, 2010 10:39 pm
No new posts How to solve tape GDG contention nemo_budd JCL & VSAM 3 Fri Nov 06, 2009 8:59 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us