日期:2014-05-16 浏览次数:20498 次
?
?
?
?
if(null!=level && !"".equals(level)) { //有条件查询 sql = "SELECT " + "E.ENUMID," + "E.role," + "E.PRI," + "E.DOMAIN," + "E.URL," + "P.PROVINCE_NAME," + "E.DISTINCT_ID," + "E.DESCRIPTION " + "FROM ENUM_INFO E, PROVINCE_INFO P " + "WHERE TO_NUMBER(SUBSTR(E.HOME_ID, 4, 3)) = P.PROVINCE_ID AND role='"+level+"' " + "UNION ALL " + "SELECT " + "E.ENUMID," + "E.role," + "E.PRI," + "E.DOMAIN,E.URL," + "'全国'," + "E.DISTINCT_ID," + "E.DESCRIPTION FROM ENUM_INFO E " + /*"WHERE E.role = 1 AND " +*/ "WHERE role='"+level+ "' AND e.home_id='"+SysConstants.FIRST_ENUM_HOMEID+"' " + "ORDER BY role ASC"; } else { //无条件查询 sql = "SELECT " + "E.ENUMID," + "E.role," + "E.PRI," + "E.DOMAIN," + "E.URL," + "P.PROVINCE_NAME," + "E.DISTINCT_ID," + "E.DESCRIPTION " + "FROM ENUM_INFO E, PROVINCE_INFO P " + "WHERE TO_NUMBER(SUBSTR(E.HOME_ID, 4, 3)) = P.PROVINCE_ID " + "UNION ALL " + "SELECT " + "E.ENUMID," + "E.role," + "E.PRI," + "E.DOMAIN,E.URL," + "'全国'," + "E.DISTINCT_ID," + "E.DESCRIPTION FROM ENUM_INFO E " + " WHERE " + /*"E.role='1' OR E.ROLE='2' " + " AND " +*/ "e.home_id='"+SysConstants.FIRST_ENUM_HOMEID+"' " + "ORDER BY role ASC"; }?
?
?
?