Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Data Type Char. Limitations????

Posted on 2005-05-03
3
Medium Priority
?
258 Views
Last Modified: 2010-03-19
As far as I "know" an nvarchar is the MAX character holder in SQL.  Am I correct?  With a max lengh of 4000 char.  I have a project going on, where a majority of the time, the values will not exceed 4000, however, in beta testing for over 2 weeks with the end users, I finally had a dump into SQL exceeding 4000.  Is there any other Data Type that will allow SQL to exceed 4000 char, so I don't run into this down the road?
0
Comment
Question by:chrisryhal
3 Comments
 
LVL 34

Accepted Solution

by:
arbert earned 500 total points
ID: 13922980
Varchar(8000)

Do you actually need an nvarchar?

You can also use a text datatype, but performing updates can get a little complex later.
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 500 total points
ID: 13922985
varchar (or char) have a maximum of 8000 characters.  You only need nvarchar (or nchar) if youa re using unicode (double-byte) characters.

text data types have a maximum of 2GB, but have limitations as to the functions and SQL clauses you can use.
0
 
LVL 2

Author Comment

by:chrisryhal
ID: 13923294
As per your postings, you both posted within (1) min of one another, so I will split the points.  I was unaware that those other datatypes offered a longer character limit.  8000 would definitly be enough.

Thanks for the advice.
CR
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question