Hi David,
I have posted a reply yesterday, but I did not realize that my post was not
sent out successfully. Sorry for that. In my post, I pointed out the
identifiers of SQL Server Objects.
Quote from the MSDN documentation, Using Identifiers As Object Names
(
http://msdn.microsoft.com/en-us/library/ms187879.aspx)
"The complete name of an object is made up of four identifiers: the server
name, database name, schema name, and object name. They appear in the
following format:
server_name .[database_name].[schema_name].object_name
| database_name.[schema_name].object_name
| schema_name.object_name
| object_name
...
An object name that specifies all four parts is known as a fully qualified
name. Each object that is created in Microsoft SQL Server must have a
unique, fully qualified name. For example, there can be two tables named
xyz in the same database if they have different owners."
Based on the MSDN documentation, the scenario (same table name with
different schema names) is supported in both SQL Server 2008 and SQL Server
2005. Also, from my testing result, Gregory’s script can work fine in both
SQL Server 2008 and SQL Server 2005.
Quote from Gregory's post:
"This does not work in prior versions, AFAIK, since users, not schemas, own
tables."
I think it is for SQL Server 2000. From SQL Server 2005, by default same
table name under different schemas is supported.
If you have any questions regarding this case, please feel free to let me
know.
Have a nice day!
Best Regards,
Lingzhi Sun
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
MSDN Managed Newsgroup support offering is for non-urgent issues where an
initial response from the community or a Microsoft Support Engineer within
2 business day is acceptable. Please note that each follow up response may
take approximately 2 business days as the support professional working with
you may need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations that require urgent,
real-time or phone-based interactions. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.