Geeks With Blogs

@woodbasen
  • woodbasen Man må bare elske Fars dag! ungerne laver morgenmad. En gave der garanterer en perfekt @COPENHELL. En halv arbejdsdag og en fodboldkamp :-D about 419 days ago

Woodbase Umbraco - CSS - jQuery - .Net - C# SQL All things related to database work ;-)
Renaming columns - and location them in stored procedures
I had to rename in a column in my database - let's call it Customer.CellPhone. Now 'CellPhone' needs to be 'Mobile'. Not to hard using the build-in SP:use WebShopEXEC sp_rename 'Customer.CellPhone', 'Mobile'goBut what if I used 'CellPhone' in a SP? Then it would fail now... But that's when I found this solution.create proc spFindWordsInSP@word nvarchar(100)asBEGINSELECT ROUTINE_NAME, ROUTINE_DEFINITIONFROM INFORMATION_SCHEMA.ROUTINES... ROUTINE_DEFINITION LIKE '%'+@word+'%'AND ROUTINE_TYPE='PROCEDURE'ORDER ......

Posted On Tuesday, August 21, 2012 8:27 AM

Copyright © woodbase | Powered by: GeeksWithBlogs.net | Join free