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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. redmurphy

    TSQL - How do I use Cursor to query other dbs and return a new RS?

    Thank you so much for that! I'm all set. Thanks again.
  2. redmurphy

    TSQL - How do I use Cursor to query other dbs and return a new RS?

    Sorry. I keep accidentally saying "table" when I mean "database". What I need to do is query the sysusers table, which has a list of all users with permission to access the database, in every database. Then, I need to return the list of databases that a specific user has permission to use...
  3. redmurphy

    TSQL - How do I use Cursor to query other dbs and return a new RS?

    If I run this: <code> EXEC sp_MSforeachdb @command1="select * from sysusers" </code> It seems to run the query on the same database every time. It gives me a 18 matching result sets (there are 18 dbs on the server)
  4. redmurphy

    TSQL - How do I use Cursor to query other dbs and return a new RS?

    Thank you! I've been looking all over for something like that. Please bear with me, I'm brand new to sql and I'm still confused about how to get what I want here. in the command portion, I obviously need to supply a qry to be run on each table. But the thing is, in each qry I need to...
  5. redmurphy

    TSQL - How do I use Cursor to query other dbs and return a new RS?

    Hi, I have need to query the master database to get a list of all databases, and then use a passed-in username to query every database's sysusers table to see if a specific user has permission to access the database. Then, I need to return a recordset to an asp page that contains only the list...

Part and Inventory Search

Back
Top