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)
 Searching for JPG in DB tables

Author  Topic 

dbaman
Starting Member

46 Posts

Posted - 2009-11-09 : 14:52:18
I have some 1500 tables in my SQLServer 2005 database. I want to search for example logo.JPG. Is it possible to write a SQL Query that can search all the tables that has logo.JPG stored?

Thanks

R

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-09 : 14:53:33
Is logo.JPG just a varchar column or is it an image?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-11-10 : 02:04:14
If it is of varchar type,
http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm

Madhivanan

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

dbaman
Starting Member

46 Posts

Posted - 2009-11-10 : 10:39:17
Thanks All. It is stored in varchar column.

Thanks Madhivanan for that link.That may be what I need.

R
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-11-10 : 23:42:21
quote:
Originally posted by dbaman

Thanks All. It is stored in varchar column.

Thanks Madhivanan for that link.That may be what I need.

R


You are welcome

Madhivanan

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

- Advertisement -