Try this:
DECLARE @A DECIMAL(5,0)
DECLARE @B DECIMAL(5,0)
DECLARE @P DECIMAL(3,0)
DECLARE @Ans DECIMAL(5,1)
SET @A = 7.
SET @B = 12.
SET @P = 100.
SELECT ROUND((@A/@B) * @P,1)
--If you just wish to display the resutl:
--that is NO further mathametical work
SELECT SUBSTRING(CAST(ROUND((@A/@B) * @P,1) AS VARCHAR(10)),1,CHARINDEX('.',ROUND((@A/@B) * @P,1),1)+1)+ '%'
If everything seems to be going well, you have obviously overlooked something.
Ron
Please help us, help you -before posting a question please read[/url]
Before posting a performance problem please read[/url]