473,486 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

varchar and nvarchar issue

Hi

The maximum length of a nvarchar could be 4000 characters while that of
varchar could be 8000.

We are trying to use unicode which would require that the datatype for
one our fields be converted from varchar to nvarchar. But looks like
this would result in loss of existing data.

Is there a way to do this without loss of data?

Many thanks.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #1
2 9040

"Vani Kancherlapalli" <vk*************@linkage-inc.com> wrote in message
news:3f*********************@news.frii.net...
Hi

The maximum length of a nvarchar could be 4000 characters while that of
varchar could be 8000.

We are trying to use unicode which would require that the datatype for
one our fields be converted from varchar to nvarchar. But looks like
this would result in loss of existing data.

Is there a way to do this without loss of data?

Many thanks.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


If you need to have more than 4000 Unicode characters in a column, then you
can either use ntext, which goes up to 1GB, or split the text into multiple
rows in a dedicated table. Since nvarchar(4000) is 8000 bytes, and the
maximum row length is 8060 bytes, there would be no way to get the data into
a single row without using ntext. If you do use ntext, check the Books
Online details on text data - there are some special considerations.

Simon
Jul 20 '05 #2
Could use an Image field or ntext field to store the data - but will get
performance hit from doing so.

"Vani Kancherlapalli" <vk*************@linkage-inc.com> wrote in message
news:3f*********************@news.frii.net...
Hi

The maximum length of a nvarchar could be 4000 characters while that of
varchar could be 8000.

We are trying to use unicode which would require that the datatype for
one our fields be converted from varchar to nvarchar. But looks like
this would result in loss of existing data.

Is there a way to do this without loss of data?

Many thanks.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
6558
by: Junkmail | last post by:
I have an application with highly compressable strings (gzip encoding usually does somewhere between 20-50X reduction.) My base 350MB database is mostly made up of these slowly (or even static)...
4
2023
by: wriggs | last post by:
Hi, This is probably an easy question for someone so any help would be appreciated. I have changed the columns in a table that where nvarchar to the same size of type varchar so halve the...
0
5474
by: Jean-Michel POURE | last post by:
Dear friends, I studying the possibility to port Compiere CRM from Oracle to PostgreSQL. As Compiere evolves nearly everyday in CVS, I would like to run the Oracle code without (too much)...
4
9875
by: Hazzard | last post by:
What is the best way to do this? Binary with 0 representing off and 1 on? Int16 with 1 representing first button, 2 the second, 3 ... varchar with a character values at certain positions in the...
4
12979
by: D. | last post by:
Hi, I'm starting a new application in java using JTDS jdbc driver (http://jtds.sourceforge.net) and SQLServer 2005 Express. I have to design the database from scratch and my doubt is if I have to...
1
27073
by: Srikanthk | last post by:
Dear Sir, What is the Difference using varchar and nvarchar in Oracle 9i.
4
2125
by: stuckish | last post by:
My collegue is saying that you should store text data in Sql Server i unicode fields (nvarchar) beause that .net (asp.net website) is all unicode and therefore you save some time not having to...
5
18319
by: haidani | last post by:
Hi, I am new to MS SQL. When I create a column in a table, when shall I use nvarchar or varchar? Please help. Thanks, Mike
2
6140
by: bharathreddy | last post by:
Here i will show the differences between nvarchar and varchar: The difference is that nvarchar is used to store unicode data, which is used to store multilingual data in the database tables....
0
7123
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6842
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5430
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4864
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.