April 5, 2012 at 12:13 pm
I need to filter the statement listed below that it only returns schema that I specify in the WHERE Clause.
For example WHERE Schema = 'CTL'
SELECT OBJECT_NAME(ep.major_id) AS [ObjectName],
CAST(Value AS nvarchar(500)) AS [MS_Description]
,OBJECT_SCHEMA_NAME(ep.major_id) as SchemaName
FROM sys.extended_properties AS ep
WHERE ep.name = N'MS_Description' AND ep.minor_id = 0
ORDER BY OBJECT_NAME(ep.major_id), OBJECT_SCHEMA_NAME(ep.major_id)
How can I revise the cord to return the intended result?
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
April 5, 2012 at 1:04 pm
looks like you already have it there, Welsh Corgi;
you are using the object_schema_name() function, so just add it to your WHERE staetment :
AND OBJECT_SCHEMA_NAME(ep.major_id) = 'CTL'
Lowell
April 5, 2012 at 2:42 pm
Lowell,
Hey yeah your right, thanks.
Whatever happened to your Dog Avatar? I liked it. What model is that Gas:-) Mask? I did not see that one before.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
April 5, 2012 at 2:44 pm
Welsh Corgi (4/5/2012)
Lowell,Hey yeah your right, thanks.
Whatever happened to your Dog Avatar? I liked it. What model is that Gas:-) Mask? I did not see that one before.
yeah my dog avatar is my mutt Debbie;
I kind of felt like changing it; this avatar is the droid police officer at the beginning of the new Star Wars movie, when he chases childhood Kirk in the stolen Corvette.
Lowell
April 5, 2012 at 3:05 pm
Lowell (4/5/2012)
Welsh Corgi (4/5/2012)
Lowell,Hey yeah your right, thanks.
Whatever happened to your Dog Avatar? I liked it. What model is that Gas:-) Mask? I did not see that one before.
yeah my dog avatar is my mutt Debbie;
I kind of felt like changing it; this avatar is the droid police officer at the beginning of the new Star Wars movie, when he chases childhood Kirk in the stolen Corvette.
Me thinks you mean Star Trek. 😉
April 5, 2012 at 4:49 pm
Lynn Pettis (4/5/2012)
Lowell (4/5/2012)
Welsh Corgi (4/5/2012)
Lowell,Hey yeah your right, thanks.
Whatever happened to your Dog Avatar? I liked it. What model is that Gas:-) Mask? I did not see that one before.
yeah my dog avatar is my mutt Debbie;
I kind of felt like changing it; this avatar is the droid police officer at the beginning of the new Star Wars movie, when he chases childhood Kirk in the stolen Corvette.
Me thinks you mean Star Trek. 😉
star wars, star trek, whats the real difference
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply