There is no such professional who could solve my problem?

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default There is no such professional who could solve my problem?

    Hi all.

    I am using ASP and SQL Server 2000

    I have a requirement in which customer fills in a form. The provided form fields are searched against the coulmns in customer table. For example FirstName is searched against FirstName in the table and so on. If the form data
    is same as that of a table row than it is 100%. If for example FirstName, LastName, sortcode, accountno are exactly the same but present address or previous address doesnt match than it should return an appropriate %age to
    which these two are similar.

    I have applied FTS on customer table but it usually returns 0 rank (although the records returned are correct but the rank is 0). And when I manually match the two records, they might be 70% similar. For example their firstname, lastName, sortcode, accountno are exactly the same but the previousAddress1 does not match at all. Now most of the fields match therefore the rank returned should be higher. I have applied FTS on all the mentioned fields.

    can I have a query or some code so that it solves my problem more efficiently. Because there are thousands of records in the customer table and I dont want to take any risks.

    I want to have the percentage to which the retrived record matched the given criteria. Please help me in this regard.

    Customer Table(Structure
    -----------------
    SortCode(varchar 20),
    AccountNo(varchar 20),
    Title(varchar 10),
    FirstName(varchar 50)
    MidName(varchar 50)
    SurName(varchar 50)
    Address(varchar 255)
    prevAddress1(varchar 255)
    prevAddress2(varchar 255

    And I'm using following query to retrieve the results

    Select customer.*, tAddress.[Rank] from Customer, FREETEXTTABLE(Customer, *, 'Mr sajid Saleem 16/03/1970 AA-12345 ab-12 House 123, Street 123, City XYZ') as tAddress Where (Contains(FirstName,'sajid') or Contains(SurName,'Saleem')) and tAddress.[Key] = idCustomer order by tAddress.[Rank]

    I'll be very thankful for your kind help.

    Regards

    Sajid Guest

  2. Similar Questions and Discussions

    1. Is there any extension that can solve this problem
      please click on the bottom link to get a better idea of the problem: ...
    2. How to solve this problem using .NET?
      Question, I'm in the process of creating a process that should do two things: 1) Connect to a webserver using an encrypted connection and then...
    3. how can i solve this problem?
      (Type your message here) -------------------------------- From: Joseph Gellidon Hello there!!! I just want to ask how can i solve this...
    4. Big problem!! Please solve it...
      Hi all.. I want a way.. or a script.. to make a ".swf" file only can be read.. I don't want any user to download it from my server to him PC... ...
    5. How to solve linking problem???Please help!!!
      Hi all, I have received an oracle based application from one of my vendors who says that they have run successfully it on Tru64 & Sun (64 bit)....
  3. #2

    Default Re: There is no such professional who could solve my problem?

    Sajid,

    This is more of an SQL server question, so perhaps you will have a better
    luck in those newsgroups.

    However, I will attempt to answer your question without getting into much
    details. With your FT, you are retrieving ONE type of information -- what
    rows qualify for your search results. You can use the primary keys of these
    rows to query your tables again to check what %age the results match.

    --
    Manohar Kamath
    Editor, .netWire
    [url]www.dotnetwire.com[/url]


    "Sajid" <sajid622@hotmail.com> wrote in message
    news:67A10BBF-35FE-4594-903D-E3C9A5CB19D3@microsoft.com...
    > Hi all.
    >
    > I am using ASP and SQL Server 2000
    >
    > I have a requirement in which customer fills in a form. The provided form
    fields are searched against the coulmns in customer table. For example
    FirstName is searched against FirstName in the table and so on. If the form
    data
    > is same as that of a table row than it is 100%. If for example FirstName,
    LastName, sortcode, accountno are exactly the same but present address or
    previous address doesnt match than it should return an appropriate %age to
    > which these two are similar.
    >
    > I have applied FTS on customer table but it usually returns 0 rank
    (although the records returned are correct but the rank is 0). And when I
    manually match the two records, they might be 70% similar. For example their
    firstname, lastName, sortcode, accountno are exactly the same but the
    previousAddress1 does not match at all. Now most of the fields match
    therefore the rank returned should be higher. I have applied FTS on all the
    mentioned fields.
    >
    > can I have a query or some code so that it solves my problem more
    efficiently. Because there are thousands of records in the customer table
    and I dont want to take any risks.
    >
    > I want to have the percentage to which the retrived record matched the
    given criteria. Please help me in this regard.
    >
    >
    > Customer Table(Structure)
    > ------------------
    > SortCode(varchar 20),
    > AccountNo(varchar 20),
    > Title(varchar 10),
    > FirstName(varchar 50),
    > MidName(varchar 50),
    > SurName(varchar 50),
    > Address(varchar 255),
    > prevAddress1(varchar 255),
    > prevAddress2(varchar 255)
    >
    >
    > And I'm using following query to retrieve the results:
    >
    > Select customer.*, tAddress.[Rank] from Customer, FREETEXTTABLE(Customer,
    *, 'Mr sajid Saleem 16/03/1970 AA-12345 ab-12 House 123, Street 123, City
    XYZ') as tAddress Where (Contains(FirstName,'sajid') or
    Contains(SurName,'Saleem')) and tAddress.[Key] = idCustomer order by
    tAddress.[Rank]
    >
    > I'll be very thankful for your kind help.
    >
    > Regards
    >

    Manohar Kamath [MVP] Guest

  4. #3

    Default Re: There is no such professional who could solve my problem?

    On Mon, 5 Apr 2004 02:11:04 -0700, "Sajid" <sajid622@hotmail.com>
    wrote:
    >I am using ASP and SQL Server 2000
    >
    >I have a requirement in which customer fills in a form. The provided form fields are searched against the coulmns in customer table. For example FirstName is searched against FirstName in the table and so on. If the form data
    >is same as that of a table row than it is 100%. If for example FirstName, LastName, sortcode, accountno are exactly the same but present address or previous address doesnt match than it should return an appropriate %age to
    >which these two are similar.
    >
    >I have applied FTS on customer table but it usually returns 0 rank (although the records returned are correct but the rank is 0). And when I manually match the two records, they might be 70% similar. For example their firstname, lastName, sortcode, accountno are exactly the same but the previousAddress1 does not match at all. Now most of the fields match therefore the rank returned should be higher. I have applied FTS on all the mentioned fields.
    >
    >can I have a query or some code so that it solves my problem more efficiently. Because there are thousands of records in the customer table and I dont want to take any risks.
    >
    >I want to have the percentage to which the retrived record matched the given criteria. Please help me in this regard.
    Well, nobody can really help. How are you determining a match, and a
    percentage assigned to it? Is a first name of Joseph and last name of
    Smith 50% match to Joe smith? Even if they actually are the same
    person? How about an address of 1600 Pennsylvania Ave versus 1600
    Pennsylvania Avenue? It's 100% the same address, but the system won't
    match it because "ave" does not match "Avenue".

    If all you want is a straight field-for-field match, count the
    database columns, count the columns that are exact matches and do the
    division. If you want something that mimics what a person would
    determine as a percentage of matching, then you'll have to write a lot
    of back-end code to mimic a person's thought patterns.

    Jeff
    Jeff Cochran Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139