Access answer.
Re: How to order rows in a predefined pattern?
In a similar situation, I derived a newid based on the id by padding extra characters in the beginning.
e.g. README, new id was ZZZREADME
and FEEDBACK, new id was ZZYFEEDBACK
and all other's newid was as is.
[sql]
Following solution not tested.
[/sql]
[sql]
Function NewId(Id as Variant) as Variant
NewId = id
If id = README then
NewId = "ZZZ" & id
end if
If id = FEEDBACK then
NewId = "ZZY" & id
end if
End Function
[/sql]
[sql]
SELECT * FROM articles ORDER BY NewId(id) DESC
[/sql]
|