S
savvy
I have a CVdetails table which all the personal and technical details
along with the path called CV_Path which stores the path of CV word
doc. Using Index Server Query i got the paths in my SQL server using
Linked Server. I used this Query
SELECT Path FROM OPENQUERY (FileSystem,'SELECT Directory, FileName,
DocAuthor, Size, Create, Write, Path FROM SCOPE (''
"c:\myCatalogFolder" '') WHERE FREETEXT (''reference'')')
Which gave a result:
Path
c:\mycatalogfolder\ajaxguide.doc
c:\mycatalogfolder\quickguide.txt
Now, I want to compare these paths with the ones in the CVdetails
table which are same and drag out the relevant CVdetails of that
particular path. My code is shown below but its not working out, its
not giving any results though the paths are same. I hope I made some
sense till now
Thanks in Advance
IF EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'FileSearchResults')
DROP VIEW FileSearchResults
GO
CREATE VIEW FileSearchResults
AS
SELECT * FROM OPENQUERY (FileSystem,'SELECT Directory, FileName,
DocAuthor, Size, Create, Write, Path FROM SCOPE (''
"c:\myCatalogFolder" '') WHERE FREETEXT (''reference'')')
Go
SELECT * FROM FileSearchResults F, CVdetails C WHERE C.CV_Path = F.PATH
Go
along with the path called CV_Path which stores the path of CV word
doc. Using Index Server Query i got the paths in my SQL server using
Linked Server. I used this Query
SELECT Path FROM OPENQUERY (FileSystem,'SELECT Directory, FileName,
DocAuthor, Size, Create, Write, Path FROM SCOPE (''
"c:\myCatalogFolder" '') WHERE FREETEXT (''reference'')')
Which gave a result:
Path
c:\mycatalogfolder\ajaxguide.doc
c:\mycatalogfolder\quickguide.txt
Now, I want to compare these paths with the ones in the CVdetails
table which are same and drag out the relevant CVdetails of that
particular path. My code is shown below but its not working out, its
not giving any results though the paths are same. I hope I made some
sense till now
Thanks in Advance
IF EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'FileSearchResults')
DROP VIEW FileSearchResults
GO
CREATE VIEW FileSearchResults
AS
SELECT * FROM OPENQUERY (FileSystem,'SELECT Directory, FileName,
DocAuthor, Size, Create, Write, Path FROM SCOPE (''
"c:\myCatalogFolder" '') WHERE FREETEXT (''reference'')')
Go
SELECT * FROM FileSearchResults F, CVdetails C WHERE C.CV_Path = F.PATH
Go