Jump to content

Sorting male female every other one


jlazyr
 Share

This topic is 7195 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Try this idea:

Make a field in the database, lets call it "sortfield".

Find all the males in the database (you need to have a way to identify males and females) and sort them however you want.

In the found set, perform a Replace by serial number, start at 1 and increment by 2 so the males are all the odd numbers.

Perform a find for all the females, sort the records, perform a replace by serial number starting at 2 and incrementing by 2 so they have all the even numbers.

Now sort the database by the sort field. The males and females sound be interleaved with males first.

LIMITATIONS: because this method relies heavily on the Replace command, it could fail in multi-user environment. The method described should work for all records, it may also work for a subset of the records.

Link to comment
Share on other sites

This topic is 7195 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.