Hello all,
i am trying to insert decimal data (i.e 3.2,4.5,6.8 )into table but receiving error: "Error converting data type varchar to numeric."
Here is the my code that i use to inserting values.
Any help is appreciate.
i am trying to insert decimal data (i.e 3.2,4.5,6.8 )into table but receiving error: "Error converting data type varchar to numeric."
Here is the my code that i use to inserting values.
Code:
create table test1
(
number1 decimal(5,1),
number2 decimal(5,1)
)
DECLARE @count1 decimal(4,1)
DECLARE @count2 decimal(4,1)
DECLARE @count3 decimal(4,1)
DECLARE @count4 decimal(4,1)
DECLARE @count5 decimal(4,1)
DECLARE @count6 decimal(4,1)
set @count1 =6
set @count2 =4
set @count3 =10
set @count4 =4
set @count5 =0
set @count6 =0
select @count4=(@count1/@count2) from test1
select @count6=(@count1/@count2) from test1
print @count4
print @count6
insert into test1 values('@count5','@count6')
Comment