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 2005 Forums
 Transact-SQL (2005)
 How to know the Table Name

Author  Topic 

rpc86
Posting Yak Master

200 Posts

Posted - 2009-08-28 : 05:45:52
Hi guys,

I'm using SQL Server 2005.

I got several tables on my database, and I need to know what Table Name has the word "Queue" whatever column it is.

Please help.

Thank you

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-08-28 : 05:48:06
[code]
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LIKE '%Queue%'
[/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

rpc86
Posting Yak Master

200 Posts

Posted - 2009-08-28 : 06:05:04
Thank you. but sorry for not clarifying more my question. your reply is very near to what I need now. What I need more is the row value. I need to return all rows and table name with the value "Queue" whatever column name or table. I mean, the rows.

thanks.
Go to Top of Page

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-08-28 : 06:13:53
http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm
Go to Top of Page
   

- Advertisement -