Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE FUNCTION dbo.ufnReturnPercentOfNumber(@FirstNumber INT, @SecondNumber INT)
- RETURNS NVARCHAR(8)
- AS
- BEGIN
- DECLARE @Result DECIMAL(8,2) = (@FirstNumber * 1.0) / (@SecondNumber * 1.0) * 100.0
- DECLARE @FinalResult NVARCHAR(8) = Cast(@Result AS NVARCHAR) + '%'
- RETURN @FinalResult
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement