ORA-01785 错误信息表示“ORDER BY 项必须是 SELECT-LIST 表达式的数目”。这意味着在 SQL 查询的 ORDER BY 子句中指定的列数必须与 SELECT 子句中选择的列数相匹配。 2. 导致 ORA-01785 错误的可能原因 列数不匹配:ORDER BY 子句中的列数多于或少于 SELECT 子句中的列数。 别名使用不当:在 SELECT 子句中...
order by max(lb.sid) desc union select lb.contno, decode(cont.conttype,'1', cont.appntno,'2', cont.insuredno), decode(cont.conttype,'1', cont.appntname,'2', cont.insuredname), to_date(lb.create_time), to_char(lb.sum_total,'9999999990.99'), to_char(lb.sum_price,'9999999990....
Oracle报错:ORA-01785 ORA-01785: ORDER BY 项必须是 SELECT-list 表达式的数目 ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list ORA-01785: ORDER BY項目は、SELECTリスト式の数値である必要があります 错误原因:ORDER BY項目里的表达式必须出现在SELECT中...
order bymax(lb.sid)desc union select lb.contno,decode(cont.conttype,'1',cont.appntno,'2',cont.insuredno),decode(cont.conttype,'1',cont.appntname,'2',cont.insuredname),to_date(lb.create_time),to_char(lb.sum_total,'9999999990.99'),to_char(lb.sum_price,'9999999990.99'),to_char(l...
select lb.contno, decode(cont.conttype, ‘1‘, cont.appntno, ‘2‘, cont.insuredno), decode(cont.conttype, ‘1‘, cont.appntname, ‘2‘, cont.insuredname), to_date(lb.create_time), to_char(lb.sum_total, ‘9999999990.99‘), ...