Re: Infinite Length String

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: David Portas (REMOVE_BEFORE_REPLYING_dportas_at_acm.org)
Date: 05/28/04


Date: Fri, 28 May 2004 11:32:33 +0100

SQL Server doesn't support datatypes of unlimited length. If your text is up
to 8000 bytes you can use a VARCHAR. If it's less than 2GB you can use a
TEXT datatype. Any more than that you'll have to do it client-side. String
concatenation from multiple rows is best done client-side anyway,
particularly if the data is large. SQL isn't really optimised for this kind
of work.

-- 
David Portas
SQL Server MVP
--


Relevant Pages

  • Re: Conversion error
    ... You canimport both types of data into a varchar column now. ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) ... www.SQLDTS.com - The site for all your DTS needs. ... >>character data has to be one or the other. ...
    (microsoft.public.sqlserver.dts)
  • Re: MSDE database too big
    ... It seems strange that I have so much data ... MsgId varchar 200 ... >> Tibor Karaszi, SQL Server MVP ... >>> Guoqi Zheng ...
    (microsoft.public.sqlserver.server)
  • Re: SQL Question for Conversion
    ... SQL Server MVP ... > convert the varchar column to an integer because integer has a higher data ... > comparison rules. ... >> Error converting data type varchar to int. ...
    (microsoft.public.sqlserver.programming)
  • Re: Very slow distinct select
    ... > smalldatetime TIME_STAMP ... quite something to win by changing char to varchar. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: Maintaining Field Length in .txt format
    ... If the types are VARCHAR, ... converts them to CHAR types. ... >are on a SQL Server 2000 environment and I can create ... The header information for the feed to be ...
    (microsoft.public.sqlserver.programming)