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 @ 11:28 AM
Points: 13,641, Visits: 11,517
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 LessThanDot.

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

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 1:33 PM
Points: 2,533, Visits: 7,116
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


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Wednesday, December 17, 2014 3:28 AM
Points: 579, Visits: 914
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