Home > Archive > MS SQL Server > July 2005 > RE: Renaming a column and replacing references to the old column n









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: Renaming a column and replacing references to the old column n
markbate

2005-07-21, 7:23 am

example - we want to rename a column called Deleted - to Active. Then scan
all procs to see where this table.column combination is used in any procs,
functions, views etc and rename as well, hope that is a little clearer. There
must be a utility out there that does this but I cany find one. thanks

"Jens Süßmeyer" wrote:
[color=darkred]
> That would be not easy to do this automatically, if two columns have the same
> name (refering to your poor designed database) you can do something like a
> search % replace). The safest way would be to iterate (manually) rhough all
> the object and change that.
>
> Sorry about that.
>
> "markbate" wrote:
>
Jens Süßmeyer

2005-07-21, 7:23 am

Search & Replace will work if you can rely on your definitions.

You want to change the name "Active" to "Deleted" on a special table. You
run S&R that´ll will change also that columns in other which should not be
changed (You should keep a hand on the automatic process), that can bring you
some weird problems if you don´t do that in a accurate way.

HTH, jens Suessmeyer.

"markbate" wrote:
[color=darkred]
> example - we want to rename a column called Deleted - to Active. Then scan
> all procs to see where this table.column combination is used in any procs,
> functions, views etc and rename as well, hope that is a little clearer. There
> must be a utility out there that does this but I cany find one. thanks
>
> "Jens Süßmeyer" wrote:
>
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com