Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

search the content of files Expand / Collapse
Author
Message
Posted Wednesday, May 7, 2014 12:11 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, May 26, 2014 1:20 AM
Points: 1, Visits: 4
hi
I want a mechanism that search the content of all files in my upload folder,then return the address of the file that contains that keyword

plz pay attention that the content of the files are not in the table,just the addresses are saved in table
Post #1568286
Posted Wednesday, May 7, 2014 12:26 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 1:40 AM
Points: 14,513, Visits: 12,558
This seems more the job for a .NET application.
An example:
File Content and Directory Search using Directory.GetFiles and PLINQ




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1568292
Posted Wednesday, May 7, 2014 12:42 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 2:50 AM
Points: 4,176, Visits: 10,766
SSIS + Script Task
or
Load to a table (SSIS/bcp/openrowset) and. search in SQL
or
Powershell...
or
External application
or
batch file + sqlcmd
or
....
Post #1568296
Posted Wednesday, May 7, 2014 12:59 AM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Today @ 2:17 AM
Points: 620, Visits: 1,025
shima_khosravani (5/7/2014)
hi
I want a mechanism that search the content of all files in my upload folder,then return the address of the file that contains that keyword

plz pay attention that the content of the files are not in the table,just the addresses are saved in table


Are you sure to do it in SQL ? As suggested by others that it is easier to do it in .net.Also may be you'll have better performance as well.


--rhythmk
------------------------------------------------------------------
To post your question use below link

http://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #1568299
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse