Created
July 27, 2012 23:07
-
-
Save wellercs/3190937 to your computer and use it in GitHub Desktop.
Searching on first character with CHARINDEX
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
DECLARE @AlphaNumChars varchar(50) | |
SET @AlphaNumChars = 'a,1,m,s' | |
SELECT * | |
FROM INFORMATION_SCHEMA.TABLES | |
WHERE CHARINDEX(LEFT(TABLE_NAME,1),@AlphaNumChars) > 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment