RE: [SQL] Re: Matching and Scoring with multiple fields

2000-07-12 Thread Tim Johnson
] Sent: 10 July 2000 21:15 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [SQL] Re: Matching and Scoring with multiple fields I'm not sure, but it seems you could calculate a column like: SELECT a,b,c,..., abs(-a)+abs(-b)+abs(-c)+... AS weight FROM t ORDER BY

Re: [SQL] Re: Matching and Scoring with multiple fields

2000-07-10 Thread Ed Loehr
Tim Johnson wrote: > > I have a table like this: > > a,b,c,d,e,f,g,h > --- > 2,5,3,4,4,5,2,2 > 1,1,1,1,1,1,1,1 > > a to h are of type int. > > I want to take input values which relate to this table say: > how do you feel about a: > how do you feel about b: > how do you feel about c

Re: [SQL] Re: Matching and Scoring with multiple fields

2000-07-10 Thread Oliver Mueschke
I'm not sure, but it seems you could calculate a column like: SELECT a,b,c,..., abs(-a)+abs(-b)+abs(-c)+... AS weight FROM t ORDER BY weight This way the closest matches would come first. On Mon, Jul 10, 2000 at 07:56:08PM +0100, Tim Johnson wrote: > I have a problem. Ok I'll

[SQL] Re: Matching and Scoring with multiple fields

2000-07-10 Thread Tim Johnson
I have a problem. Ok I'll rephrase that, a challenge. I have a table like this: a,b,c,d,e,f,g,h --- 2,5,3,4,4,5,2,2 1,1,1,1,1,1,1,1 5,5,5,5,5,5,5,5 3,3,2,4,5,1,1,3 1,1,5,5,5,5,1,4 1,5,5,5,4,4,2,1 5,5,5,5,1,1,1,1 1,1,1,1,5,5,5,5 (rows 8) a to h are of type int. I want to take input