andrew4582

fn_FormatWithCommas

Dec 4th, 2011
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.24 KB | None | 0 0
  1. CREATE FUNCTION [dbo].[fn_FormatWithCommas]
  2. (
  3.     -- Add the parameters for the function here
  4.     @value varchar(50)
  5. )
  6. RETURNS varchar(50)
  7. AS
  8. BEGIN
  9.     RETURN REPLACE(CONVERT(varchar(20), (CAST(@value AS money)), 1), '.00', '')
  10. END
Advertisement
Add Comment
Please, Sign In to add comment