PRB: Inconsistency in Behavior Between CREATE STATISTICS and UPDATE STATISTICS (268594)



The information in this article applies to:

  • Microsoft SQL Server 7.0

This article was previously published under Q268594

SYMPTOMS

CREATE STATISTICS allows the value of 'N' in 'SAMPLE N PERCENT' to be a non-integer value; however, UPDATE STATISTICS does not. If you use a non-integer value in UPDATE STATISTICS, the following error message occurs:
Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near 'non-integer value'.

WORKAROUND

Here are two ways to work around this problem:
  • Use an integer value to update the statistics.

    -or-

  • Drop and re-create the statistics.

MORE INFORMATION

This behavior is by design.

Modification Type:MajorLast Reviewed:11/5/2000
Keywords:kbDSupport kbprb KB268594