解决数据多字段复杂排序的问题

来源:互联网 发布:hgo软件 编辑:程序博客网 时间:2024/06/16 04:22
取出所有排序的字段,拼接成  num   
replace(to_char(t2.item_no,'000')||decode(t2.outp_type_name, '上午', '1', '下午', '2', '3')||decode(t3.outp_duration_name, '有号', 1, '无号', '2', '3')||to_char(decode(ascII(t5.specialty),null,0,ascII(t5.specialty)),'00000')||decode(t3.title_name,'教授','2','副教授','3','1'),' ','') num 

 

 

order by num

原创粉丝点击