Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2007
    Posts
    41

    Unanswered: Display Results based on Percentage Match

    Dear Pals,

    I have small requirement in my project.
    I need to display the results of the WHERE clause based on percentage/ranking of exact match.

    I mean the result set should be displayed based on percentage match.

    For example i have the below table.

    create table test
    (
    id int identity(1,1) primary key,
    ename varchar(10)
    )

    insert into test(ename) select 'REG'
    insert into test(ename) select 'xyz'
    insert into test(ename) select 'abc'
    insert into test(ename) select 'Reg'
    insert into test(ename) select 'Regsxysn'
    insert into test(ename) select 'psReg'

    I need the output something similar as below

    REG
    Reg
    Regsxysn
    psReg

    I have tried out with full text indexing but i could'nt get the required output.

    Any suggestions would be appreciated.

    Thanks in Advance.

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    You need to more clearly define "percentage match". For instance, you posted what you want as the output, but you did not post the input that should return that result.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

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