ORDER BY CASE:
Requirement:
There are four types of codes ‘CN’, ‘CNA’, ‘CX’ and ‘CNX’ which are there in a table. We want to process in following order CN, CNA, CX and then CNX. Order By Code will result in CN, CAN, CNX and then CX which is not required. Hence we will use ORDER BY CASE.
Data Set:
Solution:
No comments:
Post a Comment