In my SQL Query Command the Order By clause has the "decode" function.
Can someone explain what this function does to the "Sort" below?
ORDER BY
cmta.vw_headway_data.signid,
cmta.vw_headway_data.direction,
Route,
cmta.vw_headway_data.serviceid,
trapeze.linestop.sequence,
cmta.vw_headway_data.nodeid,
decode(cmta.vw_temp_planning_apc_jgovea2.excabbr, 'RPMW', 1, 'RPTH', 2, 'RPDF', 3, '', 4, 'RPSAT',5, 'RPSUN', 6),
DAY,
cmta.vw_headway_data.time
Can someone explain what this function does to the "Sort" below?
ORDER BY
cmta.vw_headway_data.signid,
cmta.vw_headway_data.direction,
Route,
cmta.vw_headway_data.serviceid,
trapeze.linestop.sequence,
cmta.vw_headway_data.nodeid,
decode(cmta.vw_temp_planning_apc_jgovea2.excabbr, 'RPMW', 1, 'RPTH', 2, 'RPDF', 3, '', 4, 'RPSAT',5, 'RPSUN', 6),
DAY,
cmta.vw_headway_data.time