Update table name and all objects that reference it

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • theJonster
    New Member
    • Feb 2007
    • 20

    Update table name and all objects that reference it

    Is there anyway that a query could update a table name and all the objects that reference it.

    e.g table name is 'Blah' change to 'BlahBLahBLah'

    and this will update all the objects in the database that uses/references that table?

    Do not feel like doing this maually.

    Thanks
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Please post it here when you find it :)

    I might need this one in my coming project.

    -- CK

    Comment

    • Delerna
      Recognized Expert Top Contributor
      • Jan 2008
      • 1134

      #3
      It is possible to write a query that lists every query,storedpro c,user defined function that uses a particular table (or view,sp,udf for that matter).

      But to the best of my knowledge you will have to rename all those occurrences manually. Will that do?

      Comment

      • theJonster
        New Member
        • Feb 2007
        • 20

        #4
        Originally posted by Delerna
        It is possible to write a query that lists every query,storedpro c,user defined function that uses a particular table (or view,sp,udf for that matter).

        But to the best of my knowledge you will have to rename all those occurrences manually. Will that do?

        Ya i have that query, but was trying to avoid the manualness part. gonna take half a day to rename all the references, am just lucky it a not-so-used table.

        Comment

        • ck9663
          Recognized Expert Specialist
          • Jun 2007
          • 2878

          #5
          Have you tried renaming the table then creating a view that points to that table? If there are referential relationships, it might be a problem, though.



          -- CK

          Comment

          Working...