• ...

    While I generally agree lets not go off on a rant.. Perhaps I read that wrong, but we don't need to be testy.

    As a rule you should never use a 3 part name when a 2 part name will do, in other words DELETE FROM SomeDB.dbo.SomeTable should not be used if the code being run is IN SomeDB, in that case DELETE FROM dbo.SomeTable is the right method.

    ...

    1. It's not a rant, but the expression of a strong feeling about the practive to name databases per enviornment.

    2. I agree, there is no need in 3-part name when you want your object to always refer to "this" database. However, quite often, large/enterprise systems use multiple databases (first example which comes to mind would be Arhive/History db's). So, you very likely to have procedures and views which require cross-database access. That's where use of 3-part name justified.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]