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

Last reviewed: November 7, 1997
Article ID: Q115924

The information in this article applies to:

  - Microsoft SQL Server version 4.2a for OS/2
  - Microsoft SQL Server version 4.2
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 SQL Server version 4.2a for OS/2 and Microsoft SQL Server version 4.2. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words: Windows NT
Keywords : kbbug4.20 kbbug4.20a SSrvServer SSrvWinNT kbprg
Version : 4.2 | 4.2a
Platform : OS/2 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: November 7, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.