tags:

views:

73

answers:

1

I encounter a strange bug - multpart identifier "tableabc..fielda" cannot be bound today.

In the above sql, I accidentally add one more dot in the query.

I key in 2 dots in the sql query.
It works in the development server (mssql 2005).
When it comes to staging server (also mssql 2005), the above error occurs.

What's the cause of that?
Both databases are mssql 2005. However, one works fine and another one fails.
Why?

+1  A: 

Normally you use 2 dots to denote the default schema, i.e. database.schema.table as database..table

You seem to be suggesting that tableabc is a table, and fielda is a column, so you wouldn't have a level between them?

can you confirm what these objectnames are suppose to be?

Do these/this object exist on the staging server?

What is the default schema of the user you are connected as?

Kev Riley
"2 dots" denotes the default schema? Any document talks about this? Thanks.
Billy
as in 'select * from database..table' - the implied schema will be the one that is the default for the user that is connected. It might be better if you post the query you are trying to run, with this fragment in context.
Kev Riley
MSDN/BOL link http://msdn.microsoft.com/en-us/library/aa224076(SQL.80).aspx
Kev Riley