Skip to content

Instantly share code, notes, and snippets.

@wellercs
Created July 27, 2012 23:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wellercs/3190937 to your computer and use it in GitHub Desktop.
Save wellercs/3190937 to your computer and use it in GitHub Desktop.
Searching on first character with CHARINDEX
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