Once again I am trying to get it right. Computed column.... I "stole" this one from Adventure Works db but i am not getting the right values.
I have a col UnitPrice (money) , UnitPriceDiscount (money) witch is suppose to contain the discount percentage and Quantity (int) then I have a col called LineTotal (the computed one). I have tried this:
but I am not getting the right values.
I am using RedGate data generator to insert 5,000,000 rows into my db for testing and the values are a mess...
If I enter the data manually and enter UnitPrice=1,00 Quantity=1 and UnitPriceDiscount=0,1 I get the "correct" value with to many decimals value = 0,900000.
What I would like to do is that UnitPriceDiscount should be between 0-100 (%) and the value should be 0,90 ...I believe the "scale" value for the computed col has to do woth the number of decimals..how do I change that??
Thankful for your help