Re: SQL Statement length

From: ch (ch_at_dontemailme.com)
Date: 11/26/04


Date: Fri, 26 Nov 2004 08:36:57 -0600

depends on how you execute it.
max varchar is 8000 characters so if you're making a string watch out
for that.
if you're using exec(@string1) and need more than 8000 characters, split
your query into multiple strings and do exec(@string1 + @string2 +
@string3+...)
i've got an application that runs queries of over 20000 characters. the
query is around 15 unions. it's the nastiest select statement i've ever
seen.

pehuan wrote:
>
> What is the max length (if any) a SQL statment can have on SQL server 2000?



Relevant Pages

  • Re: Parsing / " characters
    ... What do you mean by "the insert statement doesn't execute"? ... from the text file should contain quote marks or the other characters ... Does every line begin and end with a quote character? ... >in the field CODE, then the insert statement doesn't execute. ...
    (microsoft.public.access.externaldata)
  • Re: replace all ^p s unless followed by a date
    ... I created a macro with the code "msgbox asc" to ... and am having trouble getting rid of extra ^p characters. ... Set wdApp = CreateObject ... .Execute Replace:=wdReplaceAll ...
    (microsoft.public.word.vba.general)
  • Re: Parsing / " characters
    ... > from the text file should contain quote marks or the other characters ... >>in the field CODE, then the insert statement doesn't execute. ...
    (microsoft.public.access.externaldata)
  • Re: Address can not be more than 30 characters
    ... Its a macro. ... Put in a module and execute from there. ... I am sending this report to a thrid party who can not have the ... > address field be more than 30 characters. ...
    (microsoft.public.excel.worksheet.functions)
  • replace all ^p s unless followed by a date
    ... I am using word to prepare a delimited file to be imported into Excel and am ... characters and I would like to implement a more elegant solution. ... Set wdApp = CreateObject ... .Execute Replace:=wdReplaceAll ...
    (microsoft.public.word.vba.general)