Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 SQl Database Help

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-11-02 : 07:17:23
Jignesh Desai writes "Hello

If i try the following Sql statment
SELECT * FROM tablename

it gives the following error:
Invalid object name 'tablename'

But if i use the following SQl Statment
SELECT * FROM tableownername.tablename

It works prefectly.

Any help or sugesstions.

Thanks"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-11-02 : 07:15:30
Ummmmm....include the owner name?

That's just a WAG though.
Go to Top of Page

dsdeming

479 Posts

Posted - 2004-11-02 : 10:13:03
It's a good idea to use the owner name all the time because you can have multiple objects with the same object name as long as they have different owners. Remember that in standard 4-part object names, the owner is part of the name.

Dennis
Go to Top of Page
   

- Advertisement -