Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Max Character For String Parameter in SQL

Posted on 2004-10-24
Medium Priority
Last Modified: 2012-05-05
I have this problem. I have designed a table to store long message or remark, where these info are more than 1000 characters. When I use store procedures to assign these info into a parameter/variable (where I declared it as @str varchar(1000)), it's only return first 250 characters of remark or message? The rest of the characters are all truncated. WHy? Pls help me. Thanks in advance.

Question by:Kelvsat
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

curtis591 earned 1000 total points
ID: 12397303
Are you looking at this through query analyzer?  If you look under the options in query analyzer in the results tab you will see a maximum numbers of charcters per column option that you can change to bring back more characters.

Expert Comment

ID: 12397311
if the problem is when you are getting the details from the database then please check whether the full message is stored in the database.The text may be truncated in the front end. Please post some code, so that it will be easy for us to find the problem..
LVL 12

Expert Comment

ID: 12397501
To see if you are really storing more than 250 characters;

select max(datalength(remark)) from mytable

Expert Comment

by:Dishan Fernando
ID: 12398706
Agree with curtis591

It should be settings in QA. You can use more than 1000 as a variable


Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

610 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