sql報錯:ORA-01722: invalid number
請教高手,為何執行以下這段sql會報錯:ORA-01722: invalid number
SELECT orig_lin.line_number, orig_lin.shipment_number orig_shipment_number,
orig_lin.option_number orig_option_number,
orig_lin.component_number orig_component_number,
orig_lin.service_number orig_service_number, orig_lin.ordered_item,
retro_lin.pricing_date,
DECODE (retro_lin.line_category_code,
'RETURN', -1 * retro_lin.ordered_quantity,
retro_lin.ordered_quantity
) qty,
retro_lin.unit_selling_price,
DECODE (retro_lin.line_category_code,
'RETURN', -1
* retro_lin.unit_selling_price
* retro_lin.ordered_quantity,
retro_lin.unit_selling_price * retro_lin.ordered_quantity
) amount,
oh.order_number retrobill_order_number,
retro_lin.line_number retrobill_line_number,
retro_lin.shipment_number, retro_lin.option_number,
retro_lin.component_number, retro_lin.service_number,
retro_lin.invoiced_quantity, retro_lin.item_identifier_type,
retro_lin.order_quantity_uom, ott.NAME, orig_lin.header_id,
orig_lin.line_id, retro_lin.header_id retrobill_header_id,
retro_lin.line_id retrobill_line_id
FROM oe_order_lines_all orig_lin,
oe_order_lines_all retro_lin,
oe_order_headers oh,
oe_transaction_types_tl ott
WHERE retro_lin.order_source_id = 27
AND retro_lin.orig_sys_document_ref = orig_lin.header_id
AND retro_lin.orig_sys_line_ref = orig_lin.line_id
AND oh.header_id = retro_lin.header_id
AND oh.order_type_id = ott.transaction_type_id
AND ott.LANGUAGE = (SELECT language_code
FROM fnd_languages
WHERE installed_flag = 'B')
invalid, number, RETURN
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
逐个减少条件查
明白了,謝謝樓上的大家指點
类似于是这样的就会报错
SQL> select * from dual where 1='a';
select * from dual where 1='a'
*
ERROR at line 1:
ORA-01722: 无效数字
简单,先隐藏一些查询的栏位,只剩下几个就好弄了
看不出來是哪個欄位~~
請指點
字符串转换成数字出错
ORA-01722: invalid number
就是你的一个数据字段跟字符串进行比较了