BUG: Select Into Creates Table w/ Incorrect Precision & ScaleLast reviewed: May 2, 1997Article ID: Q150717 |
The information in this article applies to:
SYMPTOMSWhen 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
WORKAROUNDDeclare a variable as numeric before doing a SELECT INTO. declare @var1 numeric(4,1) select @var1 = 0000.0 select var2=@var1 into newtest
STATUSMicrosoft 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
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |