2 qunaiwei qunaiwei 于 2014.10.11 14:55 提问

oracle查询结果合并排序

SQL_activities = "select ACTIVITIE_ID,ACTIVITIE_TITLE,ACTIVITIE_CONTENT,ACTIVITIE_RULE,"
"ACTIVITIE_RANGE,BRANCH_CODE,START_TIME,END_TIME,CITY_CODE,RECEIVE_START_TIME,RECEIVE_END_TIME,RECEIVE_ADDRESS,"
"P_NAME,(case when sysdate < START_TIME then '0' when sysdate >= START_TIME and sysdate <= RECEIVE_END_TIME then '1' end) STATUS from MP_DISCOUNT_ACTIVITIES where DELETE_FLAG = '0' and VERIFY_FLAG != '0'"
"and END_TIME >= SYSDATE order by ACTIVITIE_RANGE ASC,CITY_CODE ASC",
SQL_activities2 = "select ACTIVITIE_ID,ACTIVITIE_TITLE,ACTIVITIE_CONTENT,ACTIVITIE_RULE,"
"ACTIVITIE_RANGE,BRANCH_CODE,START_TIME2,END_TIME2,CITY_CODE,RECEIVE_START_TIME,RECEIVE_END_TIME,RECEIVE_ADDRESS," "P_NAME,(case when sysdate < START_TIME2 then '0' when sysdate >= START_TIME2 and sysdate <= RECEIVE_END_TIME then '1' end) STATUS from MP_DISCOUNT_ACTIVITIES where DELETE_FLAG = '0' and VERIFY_FLAG != '0'"
"and END_TIME2 >= SYSDATE order by ACTIVITIE_RANGE ASC,CITY_CODE ASC",
SQL_activities3 = "select ACTIVITIE_ID,ACTIVITIE_TITLE,ACTIVITIE_CONTENT,ACTIVITIE_RULE,"
"ACTIVITIE_RANGE,BRANCH_CODE,START_TIME3,END_TIME3,CITY_CODE,RECEIVE_START_TIME,RECEIVE_END_TIME,RECEIVE_ADDRESS,"
"P_NAME,(case when sysdate < START_TIME3 then '0' when sysdate >= START_TIME3 and sysdate <= RECEIVE_END_TIME then '1' end) STATUS from MP_DISCOUNT_ACTIVITIES where DELETE_FLAG = '0' and VERIFY_FLAG != '0'"
"and END_TIME3 >= SYSDATE order by ACTIVITIE_RANGE ASC,CITY_CODE ASC",
backend_db:select(SQL_activities)++backend_db:select(SQL_activities2)++backend_db:select(SQL_activities3).
查找出来的结果怎么统一排序,本来的表里就一个时间字段,现在增加了两组,急急急

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!