Re: How to access SQL Server 2005 with Query Analyzer (SQL 2000)



Sal Young wrote:
I'm running the following select statement to get a table does not
exist error:

SELECT * FROM Address


I believe this was already addressed in another post (unless we're dealing with two identifical posts from two users).


SQL Server databases use the concept of schemas. That is, objects may or may not be owned by "dbo" - the general default from prior SQL versions. Because of this, the schema must be supplied so SQL Server knows where to look. The Address table in the AdventureWorks database is contained in the Person schema. So try:

Select * from Person.Address


--
David Gugick
Quest Software
www.imceda.com
www.quest.com


.



Relevant Pages

  • Re: Granting Permissions to Roles in SQL Server 2005
    ... Schema.ObjectName, or just ObjectName in all of our code. ... No one forces you to use schemas. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.security)
  • Re: Granting Permissions to Roles in SQL Server 2005
    ... Schema.ObjectName, or just ObjectName in all of our code. ... No one forces you to use schemas. ... Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books ... ...
    (microsoft.public.sqlserver.security)
  • Re: BizTalk 2006 VS 2005 Project templates
    ... expect Visual Studio to work without freezing like this. ... SQL Server 2k5 sp1 ... BizTalk Server 2006 Ent Ed. ... freezing is caused by not setting a Root Reference in schemas. ...
    (microsoft.public.biztalk.general)
  • Re: DBO Schema
    ... scenarios where this may not be needed. ... Using different schemas owned by different principals helps you separate ... give each subsystem its own namespace. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (microsoft.public.sqlserver.security)
  • Re: DBO Schema
    ... Yes, with 700 tables multiple schemas can be a good idea, as it may ... you should use stored procedures and all the ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.security)