BUG: Select Into Creates Table w/ Incorrect Precision & Scale

ID: Q150717


The information in this article applies to:
  • Microsoft SQL Server version 6.0

BUG#: 15072 (6.00)

SYMPTOMS

When SELECT INTO is used to create a new permanent table with initial value of 000.0, it creates a table with the length 2, precision 4 and scale 1. It works fine if any value other than 0 is used. This does not happen if you select into from an existing table into a new table.


drop table numtest
go
select i1=0000.0 into numtest
go
--** The length will be 2, precision will be 5 and scale 1 **
sp_help numtest
go 


WORKAROUND

Declare a variable as numeric before doing a SELECT INTO.


declare @var1 numeric(4,1)
select @var1 = 0000.0
select var2=@var1 into newtest 


STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.00. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

This problem does not occur in Microsoft SQL Server version 6.5.

Additional query words: sql6

Keywords : kbprg SSrvProg kbbug6.00
Version : 6.0
Platform : WINDOWS
Issue type :


Last Reviewed: March 25, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.