por Mizery_Made » Dom Nov 07, 2010 10:47 am
Actually, you can achieve this "automatically" with Bex's SQL-Viewer script and an SQL statement.
Código: Seleccionar todo
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.
Actually, you can achieve this "automatically" with Bex's SQL-Viewer script and an SQL statement.
[code]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);[/code]
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.