Jump to content

[SOLVED] Prioritize record selection


sahel

Recommended Posts

I have a set of records that i select randomly...i now have a situation where i have to prioritize some records.

 

I want to make the selection to be able to prioritize the record order, i want high priority records to be shown on top based on a 0-100 (percent) priority.

 

How can this be done??

Let me know if you have any questions.

 

Talker.

 

Link to comment
Share on other sites

Here is what i have come up with.. just a thought, need your professional advice.

 

I can add a priority column and specify the % of priority. Table data would be like:

id--value--priority

1--a--0

2--b--0

3--c--25

4--d--25

5--e--100

6--f--100

7--g--100

 

..and doing a select ordered by priority would give me..

id--value--priority

5--e--100

6--f--100

7--g--100

3--c--25

4--d--25

1--a--0

2--b--0

 

... correct? i hope so. There is only one thing that i want added.. i want them randomized within the priority.

so that the three 100% records come up randomized, the 2 25% ones randomize and the 0% randomize too..

 

How can that be done?

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.