Wrapping text field in " "

Results 1 to 3 of 3

Thread: Wrapping text field in " "

  1. #1
    Join Date
    Dec 1969

    Default Wrapping text field in " "

    I want to wrap a text field in quotation marks in SQL...<BR><BR>Something like <BR><BR>SELECT &#039;"&#039;+CONVERT(varchar,Description)+&#039;" &#039; FROM Table<BR><BR>But I guess the above code would limit the output to 255 (the max for the varchar datatype).<BR><BR>Any ideas?

  2. #2
    Join Date
    Dec 1969

    Default RE: Wrapping text field in

    you can specify the length of resulting string, if you do not, it will take 255 as default and maximum is 8000 and you can try following even on text data type<BR><BR>SELECT &#039;"&#039;+CONVERT(varchar(8000),Description)+& #039;"&#039; FROM Table<BR><BR>Good Luck<BR><BR>Ammar M Hussain<BR>Web Developer<BR>http://www.islamicgoodsdirect.co.uk

  3. #3
    Join Date
    Dec 1969

    Default Why the convert? (eop)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts