I have a problem. Ok I'll rephrase that, a challenge.
I have a table like this:
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:
and the answers will be 1 to 5.
Now I want to take those answers for my incoming a to h and scan down the
table pulling out the closest matches from best to worst. There will be
about 2000 rows in the final table and I will LIMIT the rows in blocks of 10
I can do the limiting stuff, but not the matching. My first thought was to
sum each row and match by that until I came out of my mental coma and
noticed that the last two lines have the same sum and are complete
So, where to from here? I thought I could go through line by line selecting
with a tolerance on each value say +-1 to begin with, then again with +-2
but that will take hours and I'm not entirely sure it'll work or how I'll do
I know general netequitte says that I shouldn't just dump my problem here,
but I am truly stumped by this one - if anybody can give me a pointer in the
right direction I'd greatly appreciate it.
pgsql-sql by date
|Next:||From: Ed Loehr||Date: 2000-07-10 19:07:31|
|Subject: Re: Timestamp problem|
|Previous:||From: Bernie Huang||Date: 2000-07-10 18:52:26|
|Subject: Timestamp problem|