Skip to content

Tag: sql-order-by

Custom sorting in oracle

I am trying to sort a particular column “TENOR” on the basis on maturity (group by Currencies) for eg – it should be sorted in the following order ON, SW, 1M, 2M, 3M, 6M, 9M, 1Y, 18M, 2Y and so on.. where ON = Overnight, SW = Single week and 1M = 1 month. i have tried using order by