SQLTeam.com | Weblogs | Forums

How to calculate percentage


Dear i have the below insert statement where i want to reduce the value of a price(float) by some percentage(0.3 or 0.05 or 0.11) upto 2 decimal

Insert statement:
insert into table1
select coulmn1,cloumn2.....price(- percentagetable.percentvalue)
from mastertable1 inner join workingtable on mastertable1.modelid=workingtable.modelid

table(percentagetable) for maintaining percentages id, modelid,percentvalue(float)


price * (1.0-percentvalue)


Please go this one it may be helpful to you http://sqlmag.com/t-sql/returning-percentage-2-summed-values


price * (1.0-percentvalue)