Reorder Classification Nodes Alphabetically.

Get answers about using MediaMonkey 4 for Windows.

Moderator: Gurus

declan
Posts: 85
Joined: Wed Sep 20, 2006 3:55 pm

Reorder Classification Nodes Alphabetically.

Post by declan »

I'd like my Tempo mode to be reordered alphabetically.

How do I do it?

Because of the number of items involved I can't do it manually, by dragging.
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Re: Reorder Classification Nodes Alphabetically.

Post by nohitter151 »

You can only drag and drop the items under the "Tempo" node in the tree to change the order.
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?

Please no PMs in reply to a post. Just reply in the thread.
Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Re: Reorder Classification Nodes Alphabetically.

Post by Mizery_Made »

Actually, you can achieve this "automatically" with Bex's SQL-Viewer script and an SQL statement.

Code: Select all

CREATE TEMP TABLE IF NOT EXISTS tmpSortClass (NewSortOrder INTEGER PRIMARY KEY AUTOINCREMENT, ListID INTEGER);
INSERT INTO tmpSortClass (ListID)
SELECT ID FROM Lists
WHERE IdListType IN (1) --1=Tempo, 2=Mood, 3=Occasion, 4=Quality
ORDER BY TextData COLLATE NOCASE;
UPDATE Lists SET SortOrder=(SELECT NewSortOrder FROM tmpSortClass WHERE ListID=ID)
WHERE ID IN (SELECT ListID FROM tmpSortClass);
Set the "WHERE IdListType IN ()" accordingly. Have run this multiple times on my database and have not seen any adverse effects. Though it's always recommended that you back up your database before tampering with it like this.
declan
Posts: 85
Joined: Wed Sep 20, 2006 3:55 pm

Re: Reorder Classification Nodes Alphabetically.

Post by declan »

Hi thanks for the reply. I'm afraid I don't quite understand.

I've downloaded Bex's script and installed it. If I select the SQL-Viewer from the list of scripts and paste the code it the box, what else do I need to do?
Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Re: Reorder Classification Nodes Alphabetically.

Post by Mizery_Made »

Push the button that will "Execute" or "Run" it (or whatever the terminology is, I'm using a different version than the latest official release, so yours may be slightly different than mine).
declan
Posts: 85
Joined: Wed Sep 20, 2006 3:55 pm

Re: Reorder Classification Nodes Alphabetically.

Post by declan »

It has both a "Run" & "Execute" button, I've pressed both neither has had an effect.
Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Re: Reorder Classification Nodes Alphabetically.

Post by Mizery_Made »

Attempting to run it in the version of SQL-Viewer I have, it throws an error (which is somewhat expected since mine is an old pre-release). You can try running it in SQLiteSpy however. That's actually what I've always ran it in (though the program is useless for most other things other than simply viewing the database, due to MM's "IUNICODE" collating)
Post Reply