BUG: Sp_columns Gives Incorrect Precision for View Substring

ID: Q149915


The information in this article applies to:

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          : kbprg SSrvProg kbbug6.00 
Version           : 6.0
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: March 25, 1999