471,595 Members | 1,415 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,595 software developers and data experts.

Copy text columns to nvarchar

Hi,

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.

Best regards
Marc
Jun 15 '06 #1
2 2466
Marc Filthaut (us*********************@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, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jun 15 '06 #2
Hi,

Erland Sommarskog wrote:
Marc Filthaut (us*********************@filthaut.com) writes:
The next step of this operation is to go Tools->Options->Results and
change the setting Max characters per column.

Thanks this was one of the solutions.

Best regards
Marc
Jun 16 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Lauren Quantrell | last post: by
5 posts views Thread by deebeetwo | last post: by
6 posts views Thread by JackpipE | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.