Solved

db2

Posted on 2009-07-01
4
2,488 Views
Last Modified: 2012-05-07
SQL3148W  A row from the input file was not inserted into the table.  SQLCODE
"-530" was returned.

SQL0530N  The insert or update value of the FOREIGN KEY
"LTC01.RESIDEDIAGNO_T.FACILIPROFIL04_C" is not equal to any value of the
parent key of the parent table.  SQLSTATE=23503
what is mean by this errors
0
Comment
Question by:EXPEXGSK
4 Comments
 
LVL 45

Accepted Solution

by:
Kdo earned 168 total points
Comment Utility
Hi EXPEXGSK,

Your INSERT statement attempted to add a row to a table.  The contents of that row were illegal, based on the rules of your database.

A FOREIGN KEY is a rule that requires that a data value in one table is matched by a value in another table.  In this case, there is a rule that states that the value for FACILPROFIL04_C must also be in another table.  You'll have to check the FOREIGN KEYS in your database to see exactly which table is involved.

A pretty good IBM writeup on basic constraints (A foreign key is one of several kinds of constraints) is here:

  http://www.ibm.com/developerworks/data/library/techarticle/dm-0401melnyk/index.html

The section on FOREIGN KEYS is about 3/4 the way down the page.


Good Luck,
Kent
0
 

Assisted Solution

by:bhagatali
bhagatali earned 166 total points
Comment Utility
i am assuming that you are trying to figure out what SQLCODE -530 is. The actual description of this error is:

"THE INSERT OR UPDATE VALUE OF FOREIGN KEY constraint name IS INVALID".

So basically, you are trying to insert a value into the child table for which there is no entry in the parent table.

As obvious as this sounds, is this what you are looking for?
0
 
LVL 18

Assisted Solution

by:daveslash
daveslash earned 166 total points
Comment Utility

Essentially, it means that column FACILIPROFIL04_C has a referential constraint on it that only allows it to be a certain set of values (defined in some other table).

Therefore, you'll need to research the constraint to see what table holds the values. Then, make sure the value you're inserting matches one of those.

Regards,
DaveSlash
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
This video discusses moving either the default database or any database to a new volume.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now