Solved

Max Character For String Parameter in SQL

Posted on 2004-10-24
1,349 Views
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.

Kelvsat
0
Question by:Kelvsat
    4 Comments
     
    LVL 6

    Accepted Solution

    by:
    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.
    0
     
    LVL 7

    Expert Comment

    by:sukumar_diya
    Hi,
    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..
    Thanks
    Sukumar
    0
     
    LVL 12

    Expert Comment

    by:kselvia
    To see if you are really storing more than 250 characters;

    select max(datalength(remark)) from mytable
    0
     
    LVL 8

    Expert Comment

    by:dishanf
    Agree with curtis591

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

    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    The steps for moving the system databases to a new location are documented in the following technical article: http://msdn.microsoft.com/en-us/library/ms345408(v=SQL.90).aspx. However sometimes after the moving process is finished, though SQL i…
    When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
    Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
    This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

    846 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

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now