March 26, 2009 at 2:17 am
Hi, I have a SQL server 2005 db. The table structure (from big list of columns, only decimal columns I mentioned) below.
CREATE TABLE [Product].[MetricMeasures](
[MetricMeasureID] [int] IDENTITY(1,1) NOT NULL,
[ProductID] [int] NOT NULL,
[ProductSizeValue] [decimal](4, 2) NULL,
[ItemWeightValue] [decimal](3, 3) NULL,
[MasterCartonWeightValue] [decimal](3, 3) NULL,
[MasterCartonVolumeValue] [decimal](4, 4) NULL,
CONSTRAINT [PK_MetricMeasures] PRIMARY KEY CLUSTERED
(
[MetricMeasureID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
When I tried to enter below values to the table and I am getting the error "Arithmetic overflow error converting numeric to data type numeric. The statement has been terminated."
MetricMeasureID | ProductID | ProductSizeValue | ItemWeightValue | MasterCartonWeightValue | MasterCartonVolumeValue
(Auto num) | 1 | 0.22 | 0.149 | 1.020 | 0.0040
I need advice. Do I need to modify the datatype in the table structure?
March 26, 2009 at 2:41 am
After the advice from Steelymar (Stefan Uzunov from Bulgaria) (forums.asp.net), I changed the datatype to below mentioned it worked. Thanks.
[ItemWeightValue] [decimal](6, 3) NULL,
[MasterCartonWeightValue] [decimal](6, 3) NULL,
[MasterCartonVolumeValue] [decimal](8, 4) NULL,
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply