Created
March 20, 2015 13:10
-
-
Save georgduees/add21f9cb7cf4cd09914 to your computer and use it in GitHub Desktop.
Check if string has content, and Return Trimmed, else return NULL
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
--Detect if string has leading or trailing whitespaces, if so trim them and return else return null, | |
SELECT ISNULL(NULLIF(LTRIM(RTRIM(' teststring ')), ''),NULL) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment