DoubleSort sqlite recordset?

Greetings -

I have created a nice little database app designed to manage components for my small electronic instrument manufacturing business.

I am using sqlite and frequently read from the database using ORDER BY, For example:

sql = "SELECT * FROM Categories ORDER BY CatNum"

Is there a way to do a second sort within that top level one in sqlite? Let say I want each category sorted by a quantity called “PartNumber”.

If I can’t do it within sqlite, can someone suggest a process to do that outside of sqlite?

Many thanks
Jim Wagner, Oregon Research Electronics

The ORDER BY clause is pretty flexible, so do you mean something like:

sql = "SELECT * FROM Categories ORDER BY CatNum ASC, PartNumber DESC"

I think so. Will try it.

Thanks
Jim

Works nicely. Thanks!

1 Like

You’re welcome, @James_Wagner.

Please mark your question answered, so as to help the next person :wink: