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
 General SQL Server Forums
 New to SQL Server Programming
 How to get the column name and table name

Author  Topic 

krishna_yess
Yak Posting Veteran

81 Posts

Posted - 2011-11-18 : 04:36:16
I know only the value, I don't know the table name and column name. Is there a way to get the column name and table name?

I know its weird but is there a way at all ????

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2011-11-18 : 04:52:21
Have a look here:
http://www.ssmstoolspack.com/Features?f=5


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

Eddie M
Starting Member

14 Posts

Posted - 2011-11-18 : 07:48:31
It's not at all weird. I've occasionally needed to do the same, for example when analyzing a customer's reports to try to figure out where the data is coming on.

I once wrote a quick-and-dirty program to help me do it, but it looks like the tool recommended by Webfred will be a better bet.

Ed.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-11-18 : 10:58:11
http://beyondrelational.com/blogs/naomi/archive/2010/10/29/how-to-search-a-string-value-in-all-columns-in-the-table-and-in-all-tables-in-the-database.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2011-11-21 : 02:46:52
or
http://beyondrelational.com/blogs/madhivanan/archive/2009/12/14/search-a-value-in-character-column-of-all-tables.aspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -