Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-08-08 : 08:30:29
|
| Steve writes "Hi thereI want to run a query like this to find all the user tables on a database that is not the current one.select [table_name]from <database>.information_schema.tableswhere OBJECTPROPERTY(object_id([table_name]), 'IsUserTable')=1This doesn't work because OBJECTPROPERTY only works on the current database. Unfortunately, at runtime, I don't know what database this is going to be run for (this is part of a Stored Procedure) and as USE doesn't take a variable as an argument I don't see how I can do this..Any thoughts?ThanksStevePS - WinNT4 Sp6, SQL Server 7.0" |
|
|
|
|
|