Re: Allowing Fully Qualified Queries

From: Andrew J. Kelly (sqlmvpnooospam_at_shadhawk.com)
Date: 12/05/04


Date: Sun, 5 Dec 2004 18:50:23 -0500

That is because you are referencing it incorrectly. It is not
Database.table but rather Database.own.table. If the owner is dbo you can
also substitute .. for dbo like this: YourDB..YourTable

Even when you are accessing objects int he same db you should get in the
habit of owner qualifying them lik:

SELECT * FROM dbo.Table

-- 
Andrew J. Kelly  SQL MVP
"Carlo Razzeto" <crazzeto@hotmail.com> wrote in message 
news:%23kgd5Py2EHA.1404@TK2MSFTNGP11.phx.gbl...
> Hello there, I recently installed MS SQL server on one of my servers and I 
> have a question. When preforming a select I'm supposed to be able to refer 
> to a database table in the from clause by it's fully qualified name 
> (database.table) eg.
>
> SELECT * FROM NorthWind.Customers;
>
> How ever if I attempt to preform this type of query I get the following 
> error back
>
> "Unknown object....".
>
> How can SQL Server be configured to allow me to specifiy a database table 
> by it's fully qualified name?
>
> Carlo Razzeto
> 


Relevant Pages

  • Re: Cannot view DB properties
    ... # Ran the setup and upgraded the existing SQL Server 8.00.818 to SQL Server ... owner was NULL after the UPgraded finished successfully. ... The proposed new database owner is already a user or aliased in the ... Sorry, I don't understand, what do you mean by "In-Place Upgrade"? ...
    (microsoft.public.sqlserver.security)
  • Re: HELP - I goofed when creating a database
    ... details) go to which date record - is not stored in your database; ... some reading on the merits of SQL Server vs Access. ... you select the owner or enter a new one, enter the date ordered, then ... ownerID - PK ...
    (comp.databases.ms-access)
  • Re: User names
    ... > With SP3 will tables created by upsizing from access also be dbo owned as ... >>dbo by default. ... byjust specifically giving the owner name in QA. ... >> SQL Server MVP ...
    (microsoft.public.sqlserver.server)
  • Re: not creating tables as dbo anymore ?
    ... Database Owner (dbo) ... existing user ID in the database specified by database_name. ... with the login of the current connection. ...
    (microsoft.public.sqlserver.security)
  • Re: Change dbo
    ... I have a database where a user is defined as the dbo on a database. ... I tried using SQL Server Manger ... The login for this person maps to dbo. ...
    (microsoft.public.sqlserver.security)