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.
Author |
Topic |
Ciupaz
Posting Yak Master
232 Posts |
Posted - 2014-01-10 : 10:03:57
|
Hello all,is it possible to find Column/Table that contains a particular string in varchar/nvarchar/text fields for every table in my database? For example, having the string 'Welcome' I need to find the field/fields in every table where this string is in. Thanks in advance. Luis |
|
djj55
Constraint Violating Yak Guru
352 Posts |
Posted - 2014-01-10 : 12:32:33
|
To find all columns of a data type look ate the sys.table, sys.columns, and sys.types tables. Someone will most likely have a neat way of doing it, but I use those tables.djj |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2014-01-10 : 23:16:12
|
quote: Originally posted by Ciupaz Hello all,is it possible to find Column/Table that contains a particular string in varchar/nvarchar/text fields for every table in my database? For example, having the string 'Welcome' I need to find the field/fields in every table where this string is in. Thanks in advance. Luis
seehttp://vyaskn.tripod.com/search_all_columns_in_all_tables.htm------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
Ciupaz
Posting Yak Master
232 Posts |
Posted - 2014-01-12 : 14:47:02
|
That stored procedure works perfectly. Thanks a lot Visakh.Luis |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2014-01-13 : 05:58:57
|
welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|