<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Find Table in Every Database of SQL Server</title>
	<atom:link href="http://blog.sqlauthority.com/2008/04/29/sql-server-find-table-in-every-database-of-sql-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2008/04/29/sql-server-find-table-in-every-database-of-sql-server/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Sun, 12 Feb 2012 09:22:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: prabhat</title>
		<link>http://blog.sqlauthority.com/2008/04/29/sql-server-find-table-in-every-database-of-sql-server/#comment-235137</link>
		<dc:creator><![CDATA[prabhat]]></dc:creator>
		<pubDate>Wed, 11 Jan 2012 06:51:50 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=587#comment-235137</guid>
		<description><![CDATA[i think the above query could be enhanced by using contains or freetext

because its returning every thing related to the search word. but if we want to return only the word that we have specified.. for example 

instead of returning every thing related to address it should return only adress]]></description>
		<content:encoded><![CDATA[<p>i think the above query could be enhanced by using contains or freetext</p>
<p>because its returning every thing related to the search word. but if we want to return only the word that we have specified.. for example </p>
<p>instead of returning every thing related to address it should return only adress</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deepasuraj</title>
		<link>http://blog.sqlauthority.com/2008/04/29/sql-server-find-table-in-every-database-of-sql-server/#comment-134959</link>
		<dc:creator><![CDATA[deepasuraj]]></dc:creator>
		<pubDate>Wed, 18 May 2011 07:16:01 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=587#comment-134959</guid>
		<description><![CDATA[Hi All!


how to find a particular Table view is used in more than one query?????]]></description>
		<content:encoded><![CDATA[<p>Hi All!</p>
<p>how to find a particular Table view is used in more than one query?????</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeffrey</title>
		<link>http://blog.sqlauthority.com/2008/04/29/sql-server-find-table-in-every-database-of-sql-server/#comment-95088</link>
		<dc:creator><![CDATA[Jeffrey]]></dc:creator>
		<pubDate>Fri, 22 Oct 2010 15:00:30 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=587#comment-95088</guid>
		<description><![CDATA[I am trying to create a sql script to query mutliple databases that contain the same exact tables.  I want to create a table to have a column for the database name and a table for a specific column of a table.  I am getting this error Msg 

208, Level 16, State 1, Line 34
Invalid object name &#039;&#039;+ @name +&#039;.dbo.tbldoc&#039;.

the @name is set as:

set @name=(&#039;select name from sys.databases where [name] like &#039;&#039;Z%&#039;&#039;&#039;)

declare IMAGEC cursor for
	select count(pgcount) as ImageCount from [&#039;+ @name +&#039;].dbo.tbldoc]]></description>
		<content:encoded><![CDATA[<p>I am trying to create a sql script to query mutliple databases that contain the same exact tables.  I want to create a table to have a column for the database name and a table for a specific column of a table.  I am getting this error Msg </p>
<p>208, Level 16, State 1, Line 34<br />
Invalid object name &#8221;+ @name +&#8217;.dbo.tbldoc&#8217;.</p>
<p>the @name is set as:</p>
<p>set @name=(&#8216;select name from sys.databases where [name] like &#8221;Z%&#8221;&#8217;)</p>
<p>declare IMAGEC cursor for<br />
	select count(pgcount) as ImageCount from ['+ @name +'].dbo.tbldoc</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pankaj</title>
		<link>http://blog.sqlauthority.com/2008/04/29/sql-server-find-table-in-every-database-of-sql-server/#comment-89155</link>
		<dc:creator><![CDATA[Pankaj]]></dc:creator>
		<pubDate>Thu, 23 Sep 2010 20:34:41 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=587#comment-89155</guid>
		<description><![CDATA[how to find total no of table in a database]]></description>
		<content:encoded><![CDATA[<p>how to find total no of table in a database</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Archana</title>
		<link>http://blog.sqlauthority.com/2008/04/29/sql-server-find-table-in-every-database-of-sql-server/#comment-64174</link>
		<dc:creator><![CDATA[Archana]]></dc:creator>
		<pubDate>Thu, 01 Apr 2010 00:08:22 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=587#comment-64174</guid>
		<description><![CDATA[Little correction in my above post. 
I want to generate separate script that reads the dbname and table name from the table and delete it. 
So, I would not drop temp table in 1st sproc.]]></description>
		<content:encoded><![CDATA[<p>Little correction in my above post.<br />
I want to generate separate script that reads the dbname and table name from the table and delete it.<br />
So, I would not drop temp table in 1st sproc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Archana</title>
		<link>http://blog.sqlauthority.com/2008/04/29/sql-server-find-table-in-every-database-of-sql-server/#comment-64172</link>
		<dc:creator><![CDATA[Archana]]></dc:creator>
		<pubDate>Thu, 01 Apr 2010 00:02:27 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=587#comment-64172</guid>
		<description><![CDATA[Hi, I am using this sproc and it works fine. I want to extend it so that it will also drop those dbs.
I am having a problem with that.
Would you please give me a hint?

Thanks,]]></description>
		<content:encoded><![CDATA[<p>Hi, I am using this sproc and it works fine. I want to extend it so that it will also drop those dbs.<br />
I am having a problem with that.<br />
Would you please give me a hint?</p>
<p>Thanks,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arun PK</title>
		<link>http://blog.sqlauthority.com/2008/04/29/sql-server-find-table-in-every-database-of-sql-server/#comment-64109</link>
		<dc:creator><![CDATA[Arun PK]]></dc:creator>
		<pubDate>Wed, 31 Mar 2010 09:51:29 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=587#comment-64109</guid>
		<description><![CDATA[Pinal Dave,

Can  please tell me how to get the order of table created based on the relationship created.

for Example : 1.  Master_table
                      2. Transaction_Table

Regards
Arun PK]]></description>
		<content:encoded><![CDATA[<p>Pinal Dave,</p>
<p>Can  please tell me how to get the order of table created based on the relationship created.</p>
<p>for Example : 1.  Master_table<br />
                      2. Transaction_Table</p>
<p>Regards<br />
Arun PK</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vikram</title>
		<link>http://blog.sqlauthority.com/2008/04/29/sql-server-find-table-in-every-database-of-sql-server/#comment-57816</link>
		<dc:creator><![CDATA[vikram]]></dc:creator>
		<pubDate>Mon, 23 Nov 2009 08:22:35 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=587#comment-57816</guid>
		<description><![CDATA[I want to know how to see all tables of particular database.
What is the SQL query for that.]]></description>
		<content:encoded><![CDATA[<p>I want to know how to see all tables of particular database.<br />
What is the SQL query for that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Imran Mohammed</title>
		<link>http://blog.sqlauthority.com/2008/04/29/sql-server-find-table-in-every-database-of-sql-server/#comment-57318</link>
		<dc:creator><![CDATA[Imran Mohammed]]></dc:creator>
		<pubDate>Wed, 04 Nov 2009 03:02:15 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=587#comment-57318</guid>
		<description><![CDATA[@Sandya

Exec sp_depends &#039;table_name&#039;

Result set returned, will contain all dependencies, like which other tables, views, stored procedure depend on this table

~IM]]></description>
		<content:encoded><![CDATA[<p>@Sandya</p>
<p>Exec sp_depends &#8216;table_name&#8217;</p>
<p>Result set returned, will contain all dependencies, like which other tables, views, stored procedure depend on this table</p>
<p>~IM</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sandya</title>
		<link>http://blog.sqlauthority.com/2008/04/29/sql-server-find-table-in-every-database-of-sql-server/#comment-57304</link>
		<dc:creator><![CDATA[sandya]]></dc:creator>
		<pubDate>Tue, 03 Nov 2009 19:33:05 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=587#comment-57304</guid>
		<description><![CDATA[Can we find in all the stored procedures where the table is used?
If we alter the table and add a column, and want  to see where all the table is used in the stored procedures and functions.
How do we achieve that.]]></description>
		<content:encoded><![CDATA[<p>Can we find in all the stored procedures where the table is used?<br />
If we alter the table and add a column, and want  to see where all the table is used in the stored procedures and functions.<br />
How do we achieve that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Imran Mohammed</title>
		<link>http://blog.sqlauthority.com/2008/04/29/sql-server-find-table-in-every-database-of-sql-server/#comment-54040</link>
		<dc:creator><![CDATA[Imran Mohammed]]></dc:creator>
		<pubDate>Fri, 24 Jul 2009 03:19:51 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=587#comment-54040</guid>
		<description><![CDATA[@Praveen 

-- Either make this a stored procedure or change value of @Column_Name, 

Code Starts here, 

Declare @Column_Name sysname
Set @Column_Name = &#039;eid&#039; 

Declare  @temp_variable table ([Database Name] sysname, [Schema Name] sysname,  [Table Name] sysname, [Column Name]  sysname , [Ordinal Position]Int, [Is Null] varchar(3), [Data type] varchar(50), [Length] int , [Precision] Int, [Scale] Int)

Declare @Sqlcmd1 nvarchar(4000)

Set @Sqlcmd1 = 
&#039;EXEC sp_msforeachdb
&#039;&#039;
USE ?
Select TABLE_CATALOG [Database Name]
,TABLE_SCHEMA [Schema Name]
,TABLE_NAME [Table Name]
,COLUMN_NAME [Column Name]
,ORDINAL_POSITION [Ordinal Position]
,IS_NULLABLE [Is Null]
,DATA_TYPE [Data Type]
,CHARACTER_MAXIMUM_LENGTH [Lenth]
,NUMERIC_PRECISION [Precision]
,NUMERIC_SCALE [Scale]
From Information_Schema.columns
Where COLUMN_NAME  = &#039;&#039;&#039;&#039;&#039;+@Column_Name+&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;

Insert into @temp_variable Exec Sp_ExecuteSQL @Sqlcmd1

Select * from @temp_variable

~ IM.]]></description>
		<content:encoded><![CDATA[<p>@Praveen </p>
<p>&#8211; Either make this a stored procedure or change value of @Column_Name, </p>
<p>Code Starts here, </p>
<p>Declare @Column_Name sysname<br />
Set @Column_Name = &#8216;eid&#8217; </p>
<p>Declare  @temp_variable table ([Database Name] sysname, [Schema Name] sysname,  [Table Name] sysname, [Column Name]  sysname , [Ordinal Position]Int, [Is Null] varchar(3), [Data type] varchar(50), [Length] int , [Precision] Int, [Scale] Int)</p>
<p>Declare @Sqlcmd1 nvarchar(4000)</p>
<p>Set @Sqlcmd1 =<br />
&#8216;EXEC sp_msforeachdb<br />
&#8221;<br />
USE ?<br />
Select TABLE_CATALOG [Database Name]<br />
,TABLE_SCHEMA [Schema Name]<br />
,TABLE_NAME [Table Name]<br />
,COLUMN_NAME [Column Name]<br />
,ORDINAL_POSITION [Ordinal Position]<br />
,IS_NULLABLE [Is Null]<br />
,DATA_TYPE [Data Type]<br />
,CHARACTER_MAXIMUM_LENGTH [Lenth]<br />
,NUMERIC_PRECISION [Precision]<br />
,NUMERIC_SCALE [Scale]<br />
From Information_Schema.columns<br />
Where COLUMN_NAME  = &#8221;&#8221;&#8217;+@Column_Name+&#8221;&#8221;&#8221;&#8221;</p>
<p>Insert into @temp_variable Exec Sp_ExecuteSQL @Sqlcmd1</p>
<p>Select * from @temp_variable</p>
<p>~ IM.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: praveen</title>
		<link>http://blog.sqlauthority.com/2008/04/29/sql-server-find-table-in-every-database-of-sql-server/#comment-54038</link>
		<dc:creator><![CDATA[praveen]]></dc:creator>
		<pubDate>Fri, 24 Jul 2009 00:49:31 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=587#comment-54038</guid>
		<description><![CDATA[Is there a way to query an entire sql server looking for a certain column? am trying to create an application where the users can search our entire sql server by a column name.I want the query to list the table name,database name,column name,column data type.
Any ideas or sample code will be greatly appreciated.

Thanks much..]]></description>
		<content:encoded><![CDATA[<p>Is there a way to query an entire sql server looking for a certain column? am trying to create an application where the users can search our entire sql server by a column name.I want the query to list the table name,database name,column name,column data type.<br />
Any ideas or sample code will be greatly appreciated.</p>
<p>Thanks much..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rajpreeti</title>
		<link>http://blog.sqlauthority.com/2008/04/29/sql-server-find-table-in-every-database-of-sql-server/#comment-45426</link>
		<dc:creator><![CDATA[Rajpreeti]]></dc:creator>
		<pubDate>Wed, 07 Jan 2009 09:43:39 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=587#comment-45426</guid>
		<description><![CDATA[Your articles are really very conducive to solve my problems.]]></description>
		<content:encoded><![CDATA[<p>Your articles are really very conducive to solve my problems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER - Find Table in Every Database of SQL Server - Part 3 Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2008/04/29/sql-server-find-table-in-every-database-of-sql-server/#comment-38607</link>
		<dc:creator><![CDATA[SQL SERVER - Find Table in Every Database of SQL Server - Part 3 Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Wed, 21 May 2008 04:20:58 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=587#comment-38607</guid>
		<description><![CDATA[[...] May 16, 2008 by pinaldave    Previously I wrote two articles about  SQL SERVER - Find Table in Every Database of SQL Server [...]]]></description>
		<content:encoded><![CDATA[<p>[...] May 16, 2008 by pinaldave    Previously I wrote two articles about  SQL SERVER &#8211; Find Table in Every Database of SQL Server [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://blog.sqlauthority.com/2008/04/29/sql-server-find-table-in-every-database-of-sql-server/#comment-37973</link>
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Tue, 13 May 2008 23:15:08 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=587#comment-37973</guid>
		<description><![CDATA[How about a query that writes queries?  Using sysdatabases table in the MASTER database you can write a query that looks for a table name in the sysobjects table in each database.  In my case I&#039;m looking for a &#039;Folders&#039; table.  

Running this query...

USE MASTER; SELECT &#039;USE &#039; + name + &#039;; SELECT &#039;&#039;&#039; + name + &#039;&#039;&#039; as DBName, name as TableName FROM sysobjects where name like &#039;&#039;Folders&#039;&#039;&#039; FROM sysdatabases WHERE dbid &gt; 5 ORDER BY dbid

You get these queries...

USE Northwind; SELECT &#039;Northwind&#039; as DBName, name as TableName FROM sysobjects where name like &#039;Folders&#039;
USE Q_SanJoaquin; SELECT &#039;Q_SanJoaquin&#039; as DBName, name as TableName FROM sysobjects where name like &#039;Folders&#039;
USE ClerkConv; SELECT &#039;ClerkConv&#039; as DBName, name as TableName FROM sysobjects where name like &#039;Folders&#039;
USE QuestysEnt; SELECT &#039;QuestysEnt&#039; as DBName, name as TableName FROM sysobjects where name like &#039;Folders&#039;
USE Q_Police; SELECT &#039;Q_Police&#039; as DBName, name as TableName FROM sysobjects where name like &#039;Folders&#039;

And running those queries, you get this....

DBName    TableName                                                                                                                        
--------- -------------------------------------------------------------------------------------------------------------------------------- 

(0 row(s) affected)

DBName       TableName                                                                                                                        
------------ -------------------------------------------------------------------------------------------------------------------------------- 
Q_SanJoaquin Folders

(1 row(s) affected)

DBName    TableName                                                                                                                        
--------- -------------------------------------------------------------------------------------------------------------------------------- 

(0 row(s) affected)

DBName     TableName                                                                                                                        
---------- -------------------------------------------------------------------------------------------------------------------------------- 
QuestysEnt Folders

(1 row(s) affected)

DBName   TableName                                                                                                                        
-------- -------------------------------------------------------------------------------------------------------------------------------- 
Q_Police Folders

(1 row(s) affected)]]></description>
		<content:encoded><![CDATA[<p>How about a query that writes queries?  Using sysdatabases table in the MASTER database you can write a query that looks for a table name in the sysobjects table in each database.  In my case I&#8217;m looking for a &#8216;Folders&#8217; table.  </p>
<p>Running this query&#8230;</p>
<p>USE MASTER; SELECT &#8216;USE &#8216; + name + &#8216;; SELECT &#8221;&#8217; + name + &#8221;&#8217; as DBName, name as TableName FROM sysobjects where name like &#8221;Folders&#8221;&#8217; FROM sysdatabases WHERE dbid &gt; 5 ORDER BY dbid</p>
<p>You get these queries&#8230;</p>
<p>USE Northwind; SELECT &#8216;Northwind&#8217; as DBName, name as TableName FROM sysobjects where name like &#8216;Folders&#8217;<br />
USE Q_SanJoaquin; SELECT &#8216;Q_SanJoaquin&#8217; as DBName, name as TableName FROM sysobjects where name like &#8216;Folders&#8217;<br />
USE ClerkConv; SELECT &#8216;ClerkConv&#8217; as DBName, name as TableName FROM sysobjects where name like &#8216;Folders&#8217;<br />
USE QuestysEnt; SELECT &#8216;QuestysEnt&#8217; as DBName, name as TableName FROM sysobjects where name like &#8216;Folders&#8217;<br />
USE Q_Police; SELECT &#8216;Q_Police&#8217; as DBName, name as TableName FROM sysobjects where name like &#8216;Folders&#8217;</p>
<p>And running those queries, you get this&#8230;.</p>
<p>DBName    TableName<br />
&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; </p>
<p>(0 row(s) affected)</p>
<p>DBName       TableName<br />
&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Q_SanJoaquin Folders</p>
<p>(1 row(s) affected)</p>
<p>DBName    TableName<br />
&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; </p>
<p>(0 row(s) affected)</p>
<p>DBName     TableName<br />
&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
QuestysEnt Folders</p>
<p>(1 row(s) affected)</p>
<p>DBName   TableName<br />
&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Q_Police Folders</p>
<p>(1 row(s) affected)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER - Find Table in Every Database of SQL Server - Part 2 Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2008/04/29/sql-server-find-table-in-every-database-of-sql-server/#comment-37941</link>
		<dc:creator><![CDATA[SQL SERVER - Find Table in Every Database of SQL Server - Part 2 Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Tue, 13 May 2008 16:28:48 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=587#comment-37941</guid>
		<description><![CDATA[[...] 5, 2008 by pinaldave    Long time blog reader and SQL Server Expert Simon Worth has suggested two additional method to achieve same results as described in article SQL SERVER - [...]]]></description>
		<content:encoded><![CDATA[<p>[...] 5, 2008 by pinaldave    Long time blog reader and SQL Server Expert Simon Worth has suggested two additional method to achieve same results as described in article SQL SERVER &#8211; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Worth</title>
		<link>http://blog.sqlauthority.com/2008/04/29/sql-server-find-table-in-every-database-of-sql-server/#comment-37340</link>
		<dc:creator><![CDATA[Simon Worth]]></dc:creator>
		<pubDate>Thu, 08 May 2008 21:06:11 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=587#comment-37340</guid>
		<description><![CDATA[Or you could built in functionality that SQL Server provides and use 1 line of code

sp_msforeachdb &quot;SELECT &#039;?&#039; DatabaseName, Name FROM ?.sys.Tables WHERE Name LIKE &#039;%address%&#039;&quot;

If you did indeed want to keep the results in a table you could do that too

CREATE TABLE #TableNameResults (DatabaseName VARCHAR(100) NOT NULL, TableName VARCHAR(100) NOT NULL)
INSERT INTO #TableNameResults EXEC sp_msforeachdb &quot;SELECT &#039;?&#039; DatabaseName, Name FROM ?.sys.Tables WHERE Name LIKE &#039;%address%&#039;&quot;

SELECT * FROM #TableNameResults

DROP TABLE #TableNameResults]]></description>
		<content:encoded><![CDATA[<p>Or you could built in functionality that SQL Server provides and use 1 line of code</p>
<p>sp_msforeachdb &#8220;SELECT &#8216;?&#8217; DatabaseName, Name FROM ?.sys.Tables WHERE Name LIKE &#8216;%address%&#8217;&#8221;</p>
<p>If you did indeed want to keep the results in a table you could do that too</p>
<p>CREATE TABLE #TableNameResults (DatabaseName VARCHAR(100) NOT NULL, TableName VARCHAR(100) NOT NULL)<br />
INSERT INTO #TableNameResults EXEC sp_msforeachdb &#8220;SELECT &#8216;?&#8217; DatabaseName, Name FROM ?.sys.Tables WHERE Name LIKE &#8216;%address%&#8217;&#8221;</p>
<p>SELECT * FROM #TableNameResults</p>
<p>DROP TABLE #TableNameResults</p>
]]></content:encoded>
	</item>
</channel>
</rss>

