Great suggestion. Thanks. Don't know why I didn't think of that. I do almost
exactly the same thing further down in my stored procedure.
On Mon, Jun 7, 2010 at 4:34 AM, Dimitri Fontaine wrote:
> Eliot Gable >
> writes:
>
> > I have a set of results that I am selecting from a set of tables which I
Eliot Gable wrote:
rows. Basically, I thought that if the original data was:
50, 1, 5, 'data1'
55, 1, 4, 'data2'
34, 2, 0, 'data3'
90, 2, 1, 'data4'
95, 2, 1, 'data5
And the input to the functions was:
50, 1, 5
55, 1, 4
34, 2, 0
90, 2, 1
95, 2, 1
And the prioritized and weighted order came ba
Eliot Gable writes:
> I have a set of results that I am selecting from a set of tables which I want
> to return in a random weighted order for each priority group returned. Each
> row has a
> priority column and a weight column. I sort by the priority column with 1
> being highest priority. Th
I have a set of results that I am selecting from a set of tables which I
want to return in a random weighted order for each priority group returned.
Each row has a priority column and a weight column. I sort by the priority
column with 1 being highest priority. Then, for each distinct priority, I
w