select CategoryName
from Category where CatId IN (55,568,5412,8991,928,3213,142,9250,12330,2983)
I WANT RECORD TO BE RETRIVE IN SAME ORDER AS (55,568,5412,8991,928,3213,142,9250,12330,2983)
BUT I AM GETTING SOME ANOTHER RANDOM ORDER
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AmolPosted Oct 7, 2011, 8:29 AM
select *
from ProductGroups
where GroupID in (24,12,7,14,65)
order by case GroupId
when 7 then 1 -- First in ordering
when 14 then 2 -- Second
else 3
end
Manikavelu VelayuthamPosted Oct 7, 2011, 2:41 AM
You have to implement a new logic here to retrieve it in same order as you specified above.