Created
May 24, 2016 20:11
-
-
Save gowon/7a830de3a3c87226a1b025e5ecc8a2e0 to your computer and use it in GitHub Desktop.
TSQL Capitalize String
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE FUNCTION [dbo].[Capitalize](@input VARCHAR(MAX)) | |
RETURNS VARCHAR(MAX) | |
AS | |
BEGIN | |
RETURN UPPER(LEFT(@input, 1)) + LOWER(SUBSTRING(@input, 2, LEN(@input))) | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment