Storing formatted text in SQL

  • We have an application for an external customer that stores paragraphs to a letter in varchar columns.  When some of the data is provided to us, it is formatted with underscores, italics, bold, etc.  Is there a way to preserve that formatting so that when we put it all back together in the application and create the letter that the format is still there?

     

  • Where do you want to preserve them? Do you mean in SQL tables or are you referring to any other format?

     

    Prasad Bhogadi
    www.inforaise.com

  • We were wanting to store them in SQL tables.

  • If the length of the text is less than 8000 characters you can store them in VARCHAR datatype columns. If it is more than 8000 characters you need to store them in Text datatype columns.

     

    Prasad Bhogadi
    www.inforaise.com

  • Storing anything of that nature in tables is generally a bad idea... instead, store just the UNC (\\machinename\path\filename.ext) and pass that to the app... then let your app go get the formatted data.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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