---采购订单体
select a.corder_bid,a.corderid from po_order_b a where a.iisactive = 0 ---是否激活
and a.corderid in(--采购订单头id
select b.corderid from po_order b where b.breturn='N'--是否退货
--and forderstatus ---订单状态 0或3
and b.corderid in (select c.cfirstbillhid from ic_general_b c where c.bonroadflag<>'N')---bonroadflag是否在途,
)上面的是我的sql语句,就是有错误,错误信息如下
命令出错, 行: 3 列: 17
错误报告:
SQL 错误: ORA-00911: invalid character
00911. 00000 - "invalid character"
*Cause: identifiers may not start with any ASCII character other than
letters and numbers. $#_ are also allowed after the first
character. Identifiers enclosed by doublequotes may contain
any character other than a doublequote. Alternative quotes
(q'#...#') cannot use spaces, tabs, or carriage returns as
delimiters. For all other contexts, consult the SQL Language
Reference Manual.
*Action:
就是不要改变原意,我初学,不知道怎么改正,请指点一下那里错了,应该怎样改,共同学习
select a.corder_bid,a.corderid from po_order_b a where a.iisactive = 0 ---是否激活
and a.corderid in(--采购订单头id
select b.corderid from po_order b where b.breturn='N'--是否退货
--and forderstatus ---订单状态 0或3
and b.corderid in (select c.cfirstbillhid from ic_general_b c where c.bonroadflag<>'N')---bonroadflag是否在途,
)上面的是我的sql语句,就是有错误,错误信息如下
命令出错, 行: 3 列: 17
错误报告:
SQL 错误: ORA-00911: invalid character
00911. 00000 - "invalid character"
*Cause: identifiers may not start with any ASCII character other than
letters and numbers. $#_ are also allowed after the first
character. Identifiers enclosed by doublequotes may contain
any character other than a doublequote. Alternative quotes
(q'#...#') cannot use spaces, tabs, or carriage returns as
delimiters. For all other contexts, consult the SQL Language
Reference Manual.
*Action:
就是不要改变原意,我初学,不知道怎么改正,请指点一下那里错了,应该怎样改,共同学习
select a.corder_bid,a.corderid from po_order_b a where a.iisactive = 0 ---是否激活
and a.corderid in(--采购订单头id
select b.corderid from po_order b where b.breturn='N')--是否退货
--and (forderstatus='0' or forderstatus='3') ---订单状态 0或3
and b.corderid in (select c.cfirstbillhid from ic_general_b c where c.bonroadflag<>'N')---bonroadflag是否在途,
测试过了不行
#2楼 那里的分号? 最后的那行的注释,是页面div中的行数字符有限才迫使换行的
select a.corder_bid,a.corderid from po_order_b a,po_order b,ic_general_b c
where a.corderid=b.corderid and b.corderid=c.cfirstbillhid
and a.iisactive = 0 and b.breturn='N' and c.bonroadflag<>'N'
from po_order_b a
where a.iisactive = 0 ---是否激活
and a.corderid in(( --采购订单头id
select b.corderid
from po_order b
where b.breturn = 'N' --是否退货
--and forderstatus ---订单状态 0或3
and b.corderid in ( select c.cfirstbillhid
from ic_general_b c
where c.bonroadflag <> 'N') ---bonroadflag
括弧不对