Problems dropping a table in Query Analyzer

  • Hi All:

    I'm having a weird problem dropping a table in Query Manager.

    Command:

    drop table dbo.Daily_Transactions.hist

    Error message:

    Cannot drop the table 'dbo.Daily_Transactions.hist', because it does not exist in the system catalog.

    I can drop the table just fine in Enterprise Manager and then recreate it in Query Manager. I just can't seem to be able to drop it.

    My Internet searches have only come up with "check spelling on table name" and "permission". Both of which are fine.

    thanks

    William

  • William

    Is Daily_Transactions the name of the database?

    DROP TABLE Daily_Transactions.dbo.hist

    John

  • Hi John

    Nope, the database name is "Immedia_Billing" and I've made sure that I'm in that database while attempting to drop the "Daily_Transactions.hist" table.

    Thanks

    William

  • Try this

    DROP TABLE [dbo].[Daily_Transactions.hist]

    Ram

     

     

  • this kind of naming can cause real problems - never include a decimal point or space in your database name

    MVDBA

  • Fred, Mike, and Ram

    Using "[dbo].[Daily_transactions.hist]" work just fine. Thanks Ram

    Mike, I'll take your advise in the future and not use "."'s in table naming.

    Thanks soo much, it was driving me crazy!!!

    William

  • My guess is if you have a dot in the name SQL will assume it to be Owner.tableName instead of treating the table "Daily_transactions.hist" as table Name.

    Thanks

    Sreejith

Viewing 7 posts - 1 through 6 (of 6 total)

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