BUG: SELECT INTO Does Not Raise Error with No Column NameID: Q105336
|
BUG# OS/2: 1769(4.2)
NT: 489 (4.2)
If a table is created using SELECT INTO, and no column name is given,
sp_help <tablename> will return error 515:
attempt to insert the value NULL into column <col_name>, table tempdb.dbo.#sphelptab_.....column does not allow nulls.
The SELECT INTO statement puts a NULL for the column name when aggregate
function is used and no column name is given. A table should not have
NULL column names.
For example:
select count(*), title_id
into t
from titles
Make sure the columns names are supplied when using SELECT INTO.
For example:
select count=count(*), title_id
into t
from titles
Microsoft has confirmed this to be a problem in SQL Server version 4.2 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: syscolumns sp_help function
Keywords : kbprg kbbug4.20a SSrvServer SSrvWinNT
Version : 4.2a | 4.2a
Platform : OS/2 WINDOWS
Issue type :
Last Reviewed: March 17, 1999