Select Statement Issue?

  • Hi All,

    I have a problem with number of characters allowed in varchar(8000) and Nvarchar(4000) Datatype.

    Can any body clear me how many characters allowed in varchar(8000) and nvarchar(4000)?

    I have a requirements to display more than 4000 character in select statements. but its giving error in Sql 2000.

    I really confused how to make it possible in Sql Server 2000.

    Please help me in this issue.

    Cheers!

    Sandy.

    --

  • Sandy (4/2/2008)


    Can any body clear me how many characters allowed in varchar(8000) and nvarchar(4000)?

    VARCHAR(8000) = 8000 characters.

    NVarchar(4000) = 4000 characters (each taking 2 bytes)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • hi GilaMonster,

    Thanks for Quick Reply but How can I resolve my issue?

    I have a requirements to display more than 4000 character in select statements. but its giving error in Sql 2000.

    Cheers!

    Sandy.

    --

  • char :

    Fixed-length non-Unicode character data with a maximum length of 8,000 characters.

    varchar :

    Variable-length non-Unicode data with a maximum of 8,000 characters.

    If you post the error message,then you will get some good replies from the best experts.

    karthik

  • Use varchar. Max of 8000 characters

    Use multiple variables and concatinate them.

    If you show us the code, we can help you more.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Hi GilaMonster,

    Good Idea,

    let me try this....

    Cheers!

    Sandy.

    --

  • Why can't you use ntext?

    _____________
    Code for TallyGenerator

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply