June 9, 2005 at 9:18 am
Hi All
What data type would you use to insert formatted text and keep its formatting. Such as paragraphs and line breaks?
Blaine
June 9, 2005 at 9:21 am
varchar/text (might need unicode but I doubt it)
June 9, 2005 at 9:23 am
Remi I was using varchar but it seems to concatenate the text? What do I use unicode?
June 9, 2005 at 11:02 am
UNicode is if you need some japanese characters or something like that. You'll hve to use text if you go over 8000 characters of data on a single line.
June 9, 2005 at 1:33 pm
Use the TEXT datatype. Your front-end will have to do all the interpretation of such data.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
June 10, 2005 at 1:24 am
Frank is correct!
varchar and nvarchar are stored with (start & end pointers), for different stored lengths, but dont retain line returns and tabs...
TEXT is stored similar to IMAGE, as "blob space" which retains all special characters such as in binary code...
Like an FTP transfer (char versus binary)
Coach James
June 10, 2005 at 6:41 am
June 10, 2005 at 7:47 pm
Job security is doing a job which no one else can interpet or support; So most companies must throw out the work and start again...
A Better method is to keep programming simple and direct, so it can be supported by the Greglorious's of the world...
Coach James
June 10, 2005 at 7:51 pm
Are you sure this is related to this post?
June 10, 2005 at 8:02 pm
EXAMPLE:
Using front-end application to update and maintain journal free formated text...
Are suggesting that varchar be used with some kind of parser to retain returns and tabs?
Or could it not be simplified in using TEXT as this is its purpose?
Coach James
June 10, 2005 at 8:26 pm
Text is just a longuer version of Varchar... the only question is the max expected size of the data, on which we have no information. So this is effectivly a moo(t) point.
June 13, 2005 at 1:59 pm
http://www.sql-server-performance.com/datatypes.asp
Coach James
June 13, 2005 at 2:11 pm
Still a pointless debate.
Use what you like and I'll keep using text datatype only when I need to, and it's still not known to be the case here. I've kept and still keep formatted text in varchar columns without a hitch.
I consider this thread closed.
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply