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.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 sp_msForEachDB

Author  Topic 

Gigabyte
Starting Member

30 Posts

Posted - 2012-06-20 : 13:33:04
When I am executing sp_msForEachDB, I am getting multiple tables in out put.

How can I catch these tables to do some modifications on the data.

Here is the exact query if you need:

exec sp_msForEachDB 'use ; select * from sales'

Thanks in advance !

GIGABYTE+

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-06-20 : 13:51:45
this should help:
http://weblogs.sqlteam.com/joew/archive/2008/08/27/60700.aspx


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -