Sunday, 27 May 2007

sp_msget_qualified_name

sp_MSget_qualified_name
The sp_MSget_qualified_name stored procedure is used to get the qualified name for the given object id.Syntaxsp_MSget_qualified_name object_id, qualified_name
where
object_id - is the object id. object_id is int.
qualified_name - is the qualified name of the object. qualified_name
is nvarchar(512).
This is the example to get the qualified name for the authors table from the pubs database.
USE pubs
GO
declare @object_id int, @qualified_name nvarchar(512)
select @object_id = object_id('authors')
EXEC sp_MSget_qualified_name @object_id, @qualified_name output
select @qualified_name
GO
Here is the result set from my machine:
--------------------------------------
[dbo].[authors]

2 comments:

www.imitigence.com said...
This comment has been removed by the author.
www.imitigence.com said...

Nice ...