Preserving Ordering With WHERE in() Clause

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Preserving Ordering With WHERE in() Clause

otherthingido
This post has NOT been accepted by the mailing list yet.
Hi, Is there a way we can preserve the order of returned resultset in the same order in which the ids are mentioned in the "in" clause ?

Selecdt UserId from User wehere UserId in
('caf379a6-44ba-439a-a28e-8f11a4a43c8f',
'e6fcc514-d8a3-4d1e-99a9-4e9207c9cbce',
'cf5d9bd8-4e31-4d7c-9900-811a2892e8be',
'69ded946-3712-4d98-a57c-911c85f4f8cd',
'4a26ae9e-0497-455b-a347-73a03fa2a684',
'2abbdc95-210f-41ba-844f-e34fcfc9b2e4',
'e9708197-b62c-4efd-b689-3b76f3fcf167',
'a6434660-f2e2-4016-a248-e5708608d8f8',
'62c9c81d-5214-44d3-a1e0-90d9c9ae1048',
'5e2da699-37e6-4360-be20-2503278cdb44',
'cab07e13-3034-481e-aa82-af801c868f63',
'3be1c36d-2134-4acf-a9aa-756b662d21e0',
'069d38fe-50e5-4d34-8e4c-bd738a16a857')