• mrichardson 57577 (11/8/2012)


    I am getting this error:

    Error 15335 - is already in use as a object name...

    when trying to rename a view in sql2005.

    The view name does not appear in the list in object explorer.

    If I run this query:

    select * from sysobjects where name like '%myView_ForumPermissions%'

    - I can then see the view.

    If I run this query to remove it:

    TRUNCATE table myView_ForumPermissions

    - it says it ran succsessful, but it doesn not actually delete it.

    The reason for removing it is because I am changing schemas from one schema to another (becasue after several upgrades some views and stored procedures are not using the intended .dbo schema, so i'm finding the missing ones and copying across).

    TRUNCATE does not remove objects.

    Try DROP VIEW