I have only seen that with exports from MS Access. 

Yes, +1 about using the information INFORMATION_SCHEMA views. Tapping into the 
system views is my favorite way to generate mass statements on-the-fly ;-)

DECLARE @DBPrefix VARCHAR(50)
SET @DBPrefix = 'oldabc.'

SELECT  'exec sp_rename @objname=''['+ TABLE_NAME +']'', @newname = '''+ 
SUBSTRING(TABLE_NAME , LEN(@DBPrefix)+1, LEN(TABLE_NAME)) +''''
FROM    INFORMATION_SCHEMA.TABLES
WHERE   TABLE_NAME LIKE @DBPrefix +'_%'

-Leigh


      

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328978
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to