콤마 (2) 썸네일형 리스트형 [mssql] 숫자에 콤마 붙이기 숫자형에 3자리마다 콤마를 붙이는 스칼라 함수 입니다. CREATE FUNCTION [dbo].[fn_intMoneyWithComma] ( @money INT ) RETURNS VARCHAR(50) AS BEGIN DECLARE @tempMoneyText VARCHAR(50) = NULL SET @tempMoneyText = REPLACE(CONVERT(VARCHAR(50), CAST(@money AS MONEY), 1) , '.00', '') RETURN @tempMoneyText END GO demo : http://rextester.com/GFD80572 [javascript] 숫자 3자리 마다 콤마찍기 function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } 출처 : https://goo.gl/v5VnQ 이전 1 다음