Re: sql script



Brian (b.houghtby@xxxxxxxxxxxxxxxx) writes:
I must be doing something wrong, this is my error.

Msg 547, Level 16, State 0, Line 3
The UPDATE statement conflicted with the REFERENCE constraint
"FK_GL_TrnsLne_IMA". The conflict occurred in database "EAGLE", table
"dbo.GL_TrnsLne", column 'GLL_ItmID'.
The statement has been terminated.

One problem is that we don't know what you are doing. First you ask how
to do something, then you present an error message. That means that we
have to guess.

If you change 99l5555 to 99L5555 and this gives the error above, this
indicates two things:
1) This is a key value, and there are other table referencing that key
value.
2) The database uses case-sensitive or binary collation.

There are a couple of ways to go. One is to change the constraints
to have ON UPDATE CASCADE.

But it would help to know more about what you are trying to achieve.


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: New Books Online Update Available.
    ... The exact error message you get. ... The version of SQL Server on the machine. ... This version of the Books Online will ... On the Download Center page, ...
    (microsoft.public.sqlserver.server)
  • Re: Please Help with SQL Query Problem
    ... Since you did not post any sample data, ... it - make yourself a favour and post the error message next time. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: French characters are not imported properly with bcp
    ... the error message. ... settings, you'll see 863 is the code page for Canadian French. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: Using Union and Join in a single view
    ... Yes I did read the error message and it's as clear to me as it is to ... SOPNUMBE column but the rows in each table are unique. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: sql script
    ... The UPDATE statement conflicted with the REFERENCE constraint ... the lowercase l, I get the error. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)

Loading