how to drop PK_PPRD_Metrics-2147478316' index

  • I have very strange situation

    When I execute this command I can see this index in sysindexes with this name

    select * from sysindexes where name = 'PK_PPRD_Metrics-2147478316'

    when I try to drop this index by this command,

    DROP INDEX

    PK_PPRD_Metrics-2147478316

    ON PPRD_Metrics

    It gives me following error.

    Msg 102, Level 15, State 1, Line 2

    Incorrect syntax near '-'.

    I tried with underscore and some other various combinations. Why I cant drop it?????the name from sp_help or from sysindexes is same as like PK_PPRD_Metrics-2147478316'

    Any suggestions??

    Thanks in advance

  • That's what the brackets [] are for:

    DROP INDEX

    [PK_PPRD_Metrics-2147478316]

    ON PPRD_Metrics

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply