Hi!
I used below query, now I want two number after decimal place.
DECLARE @Percent AS TABLE(Id INT,name varchar(10),Price float)
INSERT INTO @Percent VALUES(1,'Apple',10)
INSERT INTO @Percent VALUES(2,'Orange',10)
INSERT INTO @Percent VALUES(3,'Tomato',10)
DECLARE @Detail AS TABLE(Id INT,Price money, IdProduct int)
INSERT INTO @Detail VALUES(1,15,1)
INSERT INTO @Detail VALUES(2,18,2)
INSERT INTO @Detail VALUES(3,25,3)
INSERT INTO @Detail VALUES(4,35,1)
select ((d.Price*p.Price)/100)/12 as result from @Detail d inner join @Percent p on d.IdProduct = p.Id