Health Is wealth,Be sound And good

Wednesday, January 18, 2017

SQL-Server Function to get Sum of Integer / Money values in a String


SQL Server User Defined Function (UDF) — Get sum of Integer or Money values in a String
Here are two Microsoft SQL-Server Transact-SQL (T-SQL) user-defined functions (UDF) that scan a Varchar (String) that is composed of a sequence of fixed-length Integer (INT, SMALLINT, BIGINT) or MONEY values and sum up those values as the BIGINT or MONEY return-value of each function, respectively.


No comments:

Post a Comment