Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using exec sp_help with a different schema then dbo 1

Status
Not open for further replies.

sds814

Programmer
Feb 18, 2008
164
US
When I try to use sp_help with any other schema besides dbo, I get an error: Incorrect syntax near '.'. So when I try exec sp_help Reports.TableA I get the error above.

Does the syntax have to be different when using a non-dbo schema?

Thanks
 
try...

Code:
exec Reports.sp_help TableA


-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Got the error:

Could not find stored procedure 'Reports.sp_help'.
 
My mistake. Sorry.

If you are trying to look something up in a different database, you can use:

sp_help Database.schema.sp_help ProcedureName

Anyway.... for your case, you should use single-quotes around the object name, like this:

Code:
exec sp_help 'Reports.TableA'




-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top