Questions Regarding BLOBs

  • Hi All,

    I want to ask couple of questions.

    1. How can i caluclate the length of the string in Text Datatype coulm?

    2. How can i make use of text paramter in SP as most of T-SQL functions do not work on Text data type, so whats the best use of Text data type parameter?

    Waiting for your reply.

    Kind Regards,

    Affan

     

     

  • 1. I would use DATALENGTH

    2. Your best bet is varchar(8000) or nvarchar(4000)

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Strange that Data length always gives me 8000 even if the length of the string is above 8000.

    Kind Regards,

    Affan

     

  • Strange?

    Can you post your statement?

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Oh yes, and DDL of your table?

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

Viewing 5 posts - 1 through 4 (of 4 total)

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