BUG: Insert From Subquery Returns Error Message 213 "Insert Error.." (284141)
The information in this article applies to:
This article was previously published under Q284141
BUG #: 101144 (SQLBUG_70)
SYMPTOMS
The second INSERT in the script shown in the "More Information" section attempts to insert values into a table from a subquery. When you run the script, this error message occurs:
Server: Msg 213, Level 16, State 3, Line 2
Insert Error: Column name or number of supplied values does not match table definition.
WORKAROUND
To work around this problem, you can change the INSERT statement to either:
insert x (b,c) select b,c from y
-or-
insert x (b,c) select b,c from (select b,c from y) z
STATUS
Microsoft has confirmed this to be a problem in SQL Server 7.0.
Modification Type: | Major | Last Reviewed: | 10/16/2002 |
---|
Keywords: | kbBug kbDSupport KB284141 |
---|
|