Getting Started with Adobe After Effects - Part 6: Motion Blur
A collection of quick technology learning tips from what people around you learn every day

SQL Server - Find column names which have Special characters

Oct 26 2011 2:12PM by hellosuresh   

The following script helps to find columns which have special characters other than alphanumeric, in a given database. If some special character for example under score "_" as part of column name and want to ignore, include special character with escape character as below in regular expression.

col.COLUMNNAME LIKE '%[^a-zA-Z0-9/]%'

USE[<database name>]
GO

SELECT  tab.TABLE_NAME,col.COLUMN_NAME
FROM    INFORMATION_SCHEMA.COLUMNS col
INNER   JOIN INFORMATION_SCHEMA.TABLES tab
    	ON tab.Table_name = col.TABLE_NAME
WHERE   tab.TABLE_TYPE = 'BASE TABLE'	
    	AND
    	col.COLUMN_NAME  LIKE '%[^a-zA-Z0-9]%'
Read More..   [0 clicks]

Published under: SQL Server Tips ·  ·  ·  · 


hellosuresh
246 · 1% · 183
9
 
6
 
 
0
Incorrect
 
0
Interesting
 
0
Forgotten



Submit

Your Comment


Sign Up or Login to post a comment.

"SQL Server - Find column names which have Special characters" rated 5 out of 5 by 9 readers
SQL Server - Find column names which have Special characters , 5.0 out of 5 based on 9 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]