You are here: Re: Copy text columns to nvarchar « MsSQL Server « IT news, forums, messages
Re: Copy text columns to nvarchar

Posted by Erland Sommarskog on 10/02/07 11:50

Marc Filthaut (usenet_delete_for_reply@filthaut.com) writes:
> I have a problem, I have a table with a text type column and a
> nvarchar(2000) type column on my MS SQL 2000 Server.
>
> I know that the longest text in the text field is 1000 chars. I want to
> copy the content the content of the text field into the nvarchar field.
>
> I tried convert and cast but after the update there are only 255 chars
> in the nvarchar field.

I don't believe that. Add a len(nvarcharfield) to you query and you
will make a revelation.

The next step of this operation is to go Tools->Options->Results and
change the setting Max characters per column.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

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

 

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

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