SQL SERVER 2000 delete problem RRS feed

  • Question

  • Hi All! Im new here and Im not pretty sure if this thread really belongs here. I just want to ask why I kept on having errors in deleting a record in Enterprise Manager.

    Everytime I delete a record / row in a table it prompts me of Invalid Object Name. I guess its because of my table name "my.table" because it has a "." (dot). Does MS SQL not enclosed my table name by brackets "[]" to ensure success of action?

    Anyway, It was just a dummy table that's why my table name has a "." and Im pretty sure that this naming convention is a NO - NO but nonetheless, I think MSSQL should still be able to process my delete query regardless of the name of my table (Since in the first place it didnt warn me upon creating the table that the name is invalid)

    Hope you can enlighten me.


    Friday, March 24, 2006 6:34 AM


  • Yes, you are correct - it's a big nono to name a table like that.

    You should disregard the fact that it is possible to do by using square brackets, it's not recommended to bypass the naming rules (or any other rules for that matter) just because there exists a way that will let you do so.

    As for editing in EM... I don't particularly like that either, and I recommend against it.
    If you wish to do DML operations, I recommend doing it in QA instead. By doing that, it will give you more flexibility and, most importantly, transactional control.

    Should you click somewhere wrong in EM, the data is gone. If you instead use QA, you can say 'BEGIN TRAN' and then run your statement.. should something look fishy, you can always say 'ROLLBACK'. Not so if you did it in EM.... =:o/


    Friday, March 24, 2006 1:24 PM