Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 Preview

Author  Topic 

nsithole
Starting Member

9 Posts

Posted - 2013-10-08 : 07:45:14

preview

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-10-08 : 08:05:22
Error message:String or binary data would be truncated.Statement has been terminated.
This error message means that you are trying to enter a string into a column that is not wide enough to store that string. For example, if you had a column that is defined as VARCHAR(5) and you tried to enter a six-character (or longer) string - e.g. "ABCDEF" into that column, you will get this error message.

Insert statement conficted with FK constraint in database "OLTP" table Property_source column 'Property_ID
This message is telling you that there is no row in the PROPERTY table that matches the Property_ID value that you are trying to enter into LOAN table. The foreign key constraint that you set up means that for every row that you want to enter into the LOAN table, the Property_ID value you will be inserting has to be in the PROPERTY table.
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2013-10-08 : 08:05:45
What other columns do you have in the Property table? You seem to trying to insert a string somewhere that is too long for the field.

Can you post DDL for these tables?
Go to Top of Page

nsithole
Starting Member

9 Posts

Posted - 2013-10-09 : 09:23:32
preview
Go to Top of Page

nsithole
Starting Member

9 Posts

Posted - 2013-10-09 : 09:54:03
Thanks for the reply. I have everything corrected

Noreen sithole
Go to Top of Page
   

- Advertisement -