i am multipying the values in the query
DECLARE @Rate
DECLARE @numeric
DECLARE @Result decimal
SET @Rate= .01
SET @Result=34750*@Rate
print @Result
but it always displays the value as 0
as per my logic the result should be 347.5
after i get the result 347.5 i need to spilt the values an d insert into 2 variables
like
@var1= 347
@var2=5
what wromg i am doing here please let me know, any help would be great
Thanks
Prince
You need to define scale and precision to numeric and decimal data types
You can get the whole part by casting to integer (I’m not sure if you want INT or FLOOR rounding, however). I’ve assumed that you just want the single most significant digit of the fraction.