You are here: Update Query Help!! « MsSQL Server « IT news, forums, messages
Update Query Help!!

Posted by sbowman on 09/26/06 18:51

I ran the following update query in Sql Server 8.0:

update _SMDBA_._CUSTOMER_
set _SMDBA_._CUSTOMER_.client = dbo.results.adid
from _SMDBA_._CUSTOMER_, dbo.results
where _SMDBA_._CUSTOMER_.client = dbo.results.clientid;

I got the following error:
Server: Msg 2627, Level 14, State 2, Line 1
Violation of UNIQUE KEY constraint 'UQ_CUSTOMER_CLIENT'. Cannot insert
duplicate key in object '_CUSTOMER_'.
The statement has been terminated.

Shouldn't the update query update the records that match in the
dbo.results table? I'm not appending data, i'm updating...I don't
understand why I'm getting this error! Any help is much appreciated!!

Shelley

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация