BUG: Sp_columns Gives Incorrect Precision for View Substring

Last reviewed: May 2, 1997
Article ID: Q149915

The information in this article applies to:
  • Microsoft SQL Server, version 6.0
BUG#: 14704 (6.00)

SYMPTOMS

Sp_columns incorrectly reports the precision of substring columns in views as 2147483647.

WORKAROUND

Recode the view to not have the substring.

STATUS

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

This problem does not occur in version 6.50.

MORE INFORMATION

The type of view causing the problem is:

CREATE VIEW TestVw1 AS

    Select ProbCol=substring(au_fname,1,1), au_fname
       from Authors

The large precision is reported up through the ODBC driver and can cause clients to think the column is a text column (for example, Microsoft Access treats the column as a memo column).


Additional query words: sql6 default
Keywords : kbbug6.00 kbprg SSrvProg
Version : 6.0
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.