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. Advertisements

  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. Advertisements

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:
    749
    VB Programmer
    Jul 10, 2003
  2. Random
    Replies:
    1
    Views:
    5,010
    Random
    Nov 19, 2004
  3. =?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:
    662
    =?Utf-8?B?UmFlZCBTYXdhbGhh?=
    Mar 7, 2005
  4. Ken Varn
    Replies:
    1
    Views:
    1,111
    Ken Varn
    Aug 19, 2005
  5. Smokey Grindle

    template column checkbox problem in grid view

    Smokey Grindle, Jun 27, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    4,277
    Smokey Grindle
    Jun 28, 2006
  6. Cal
    Replies:
    1
    Views:
    681
    Tim B
    Jan 8, 2007
  7. Carl Howarth

    DG Column Width vs Table Column Width

    Carl Howarth, Oct 22, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    469
    Eliyahu Goldin
    Oct 24, 2004
  8. Parthiv Joshi
    Replies:
    1
    Views:
    1,115
    Samuel L Matzen
    Jul 6, 2004
Loading...