Problem with comparing a Table View Column with the Table Column?

Discussion in 'ASP .Net' started by savvy, Jan 18, 2006.

  1. savvy

    savvy Guest

    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
    savvy, Jan 18, 2006
    #1
    1. Advertising

  2. savvy

    savvy Guest

    i think i got the answer. Thanks for your time mate.
    Just now i found out that though i assign the path directly as shown
    below it was not selecting the particular row.
    I checked be4 therefore no spaces i dont know why it was not selecting
    SELECT * FROM CVdetails WHERE
    CV_Path='c:\mycatalogfolder\quickguide.txt'
    Then i deleted the path in that field and copied it again and suprising
    it worked.
    Anyway, it worked finally
    savvy, Jan 18, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VB Programmer
    Replies:
    1
    Views:
    570
    VB Programmer
    Jul 10, 2003
  2. =?Utf-8?B?UmFlZCBTYXdhbGhh?=

    Icon View and list View in ASP.NET

    =?Utf-8?B?UmFlZCBTYXdhbGhh?=, Mar 7, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    473
    =?Utf-8?B?UmFlZCBTYXdhbGhh?=
    Mar 7, 2005
  3. Ken Varn
    Replies:
    1
    Views:
    956
    Ken Varn
    Aug 19, 2005
  4. Luqman
    Replies:
    2
    Views:
    3,780
    Luqman
    Feb 1, 2006
  5. Parthiv Joshi
    Replies:
    1
    Views:
    629
    Samuel L Matzen
    Jul 6, 2004
Loading...

Share This Page