Posted on 2009-07-01
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
Question by:EXPEXGSK
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 45

Accepted Solution

Kent Olsen earned 168 total points
ID: 24757684

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:

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

Good Luck,

Assisted Solution

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


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?
LVL 18

Assisted Solution

by:Dave Ford
Dave Ford earned 166 total points
ID: 24757697

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.


Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL ( and MongoDB (…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor ( Top Charts is a view in which you can set seve…

688 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