ORA-00923:未找到FROM关键字 [英] ORA-00923: FROM keyword not found where expected

查看:106
本文介绍了ORA-00923:未找到FROM关键字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好专家,

我正在尝试执行查询,当我从数据适配器填充数据集时出现以下错误:

ORA-00923:FROM keyword not not找到了预期的地方



但是这个查询在sql中成功执行。



这可能是什么原因和怎么解决呢?



我的sql查询是:



SELECT po.po_no,po.po_item ,po.matnr,to_char(to_date(po.crdat_po,'YYYYMMDD'),'DD-MON-YYYY')为crdat_po,po.plant_des,po.sloc,po.quantity,po.used_quantity,po.quantity - po.used_quantity为balanced_qty,mt.section,mt.quality,mt.LENGTH,mt.description,case(po.po_type)当'R'然后'ROAD'当'W'然后'WAGON'结束为 po_type,po.sap_quantity FROM ylpct_purord_dtl_dst po,t_material_master mt WHERE po.matnr = mt.material_no AND po.status ='A'and po.po_no ='0003107653'and po.po_item ='00001'and po.ord_type =' DO'和po.PLAN T_SUP ='027'由po.PO_NO订购,po.PO_ITEM

Hello experts,
I am trying to execute a query, when I fill dataset from data adapter I got this following error:
ORA-00923: FROM keyword not found where expected

but this query execute successfully in sql.

what will be the possible reason and how to solve it?

my sql query is :

SELECT po.po_no, po.po_item, po.matnr, to_char(to_date(po.crdat_po,'YYYYMMDD'),'DD-MON-YYYY') as "crdat_po", po.plant_des, po.sloc, po.quantity, po.used_quantity, po.quantity - po.used_quantity as "balanced_qty", mt.section, mt.quality, mt.LENGTH,mt.description,case(po.po_type) when 'R' then 'ROAD' when 'W' then 'WAGON' end as "po_type", po.sap_quantity FROM ylpct_purord_dtl_dst po, t_material_master mt WHERE po.matnr = mt.material_no AND po.status = 'A' and po.po_no='0003107653' and po.po_item='00001' and po.ord_type='DO' and po.PLANT_SUP ='027' order by po.PO_NO, po.PO_ITEM

推荐答案

嗨Praveen Kumar,

一旦我遇到同样的经历错误然后我更改查询。该查询的语法如下



Hi Praveen Kumar,
once i had experienced with the same error then i change the query.the syntax of that query is as follows

select * from (your query)t;





the以上将解决您的问题





问候

Smart003



the above will resolve your issue


regards
Smart003


这篇关于ORA-00923:未找到FROM关键字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆