Re: Freaking column names
- From: "Stu" <stuart.ainsworth@xxxxxxxxx>
- Date: 15 Aug 2005 16:18:30 -0700
How about this? Rather than a stored procedure, generate a script to
run against all of your columns, like so:
SELECT 'exec sp_rename ''' + Table_Name + '.'
+ Column_name + ''', ''' +
REPLACE(COLUMN_NAME, '-', '') + ''', ''COLUMN'''
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LIKE '%-%'
Cut and paste the results of the query into a new QA window and execute
the statements.
HTH,
Stu
.
- Follow-Ups:
- Re: Freaking column names
- From: NickName
- Re: Freaking column names
- References:
- Freaking column names
- From: NickName
- Freaking column names
- Prev by Date: Re: Microsoft SQL Server 2005 install problem.........
- Next by Date: Re: Freaking column names
- Previous by thread: Re: Freaking column names
- Next by thread: Re: Freaking column names
- Index(es):
Relevant Pages
|