Try this:
DECLARE @a DECIMAL(5,0)
DECLARE @b-2 DECIMAL(5,0)
DECLARE @P DECIMAL(3,0)
DECLARE @Ans DECIMAL(5,1)
SET @a = 7.
SET @b-2 = 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]