BUG: SELECT INTO from a View May Cause Extra Error Messages

Q115924


The information in this article applies to:

BUG# 817 (4.2)

SYMPTOMS

A SELECT from a view with an INTO clause may cause an error indicating a type mismatch in the WHERE clause when one does not exist. This happens if the WHERE clause contains two consecutive comparisons of a given type followed by a third involving an implicit conversion.

Possible messages would be:

Msg 206, Level 16
State 2 Operand type clash: int is incompatible with smalldatetime

Msg 257, Level 16
State 1 Implicit conversion from datatype 'int' to 'char' is not
allowed. Use the CONVERT function to run this query.


WORKAROUND

Create the target table and use an INSERT with a SELECT instead of a SELECT INTO.


STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 4.2. This problem does not occur in Microsoft SQL Server versions 6.0 and later.

Additional query words: Windows NT

Keywords : kbprogramming
Issue type :
Technology : kbSQLServSearch kbAudDeveloper kbSQLServ420OS2


Last Reviewed: February 10, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.