Microsoft KB Archive/70868

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 19:29, 12 August 2020 by X010 (talk | contribs) (X010 moved page Microsoft KB Archive/Q70868 to Microsoft KB Archive/70868 without leaving a redirect: Text replacement - "Microsoft KB Archive/Q" to "Microsoft KB Archive/")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

PRSQL9103048: Using the Datalength() Function with Convert() ID Number: Q70868

1.10 OS/2 buglist1.10

Summary:

PROBLEM ID: PRSQL9103048

SYMPTOMS Using the Datalength() function in conjunction with the convert() function will return incorrect results if the convert() function uses the CHAR datatype in a local variable (@var1,@var2).

CAUSE The Datalength() function will return the combined length of the variables, instead of the length of the datatype converted to. For example, if @var1 is defined as 10 characters and @var2 is defined as 7 characters, the following statement will return a length of 17:

  Datalength(convert(char(15),@var1 + @var2))

STATUS Microsoft has confirmed this to be a problem in SQL Server version 1.10. We are researching this problem and will post new information here as it becomes available.