You are here: Re: Update a uniqueidentifier from a string!!! « MsSQL Server « IT news, forums, messages
Re: Update a uniqueidentifier from a string!!!

Posted by Dan Guzman on 10/19/06 12:38

> taked error is "Message 8169 string to uniqueidentifier error"
> why?

I suspect your KeyField column is a string type instead of uniqueidentifier
and you have existing data in the table that can't be converted to
uniqueidentifier for the WHERE clause comparison. If this is not your
problem, please post the CREATE TABLE DDL for your table.


--
Hope this helps.

Dan Guzman
SQL Server MVP

"hjmaasc rolkey" <hjmaasc@163.com> wrote in message
news:45365250$0$10308$815e3792@news.qwest.net...
> declare @sd1 uniqueidentifier,
> @sd2 uniqueidentifier
> set @sd1='984AB9D7-3E8F-483E-9346-2DE900224594'
> set @sd2='B20937DF-B1C6-41D4-B7CD-511BEB72C1E9'
>
> Here is not errro, but
>
> declare @sd1 uniqueidentifier,
> @sd2 uniqueidentifier
> set @sd1='984AB9D7-3E8F-483E-9346-2DE900224594'
> set @sd2='B20937DF-B1C6-41D4-B7CD-511BEB72C1E9'
> UPDATE TableName SET Value=@sd1
> WHERE KeyField=@sd2
>
> taked error is "Message 8169 string to uniqueidentifier error"
> why?
>
> *** Sent via Developersdex http://www.developersdex.com ***

 

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

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