多表查询select a.happy,e.personid,a.createtime
from ap_xmtpip a , ap_apply b , ap_flowinfo c,ro_person e
where
(
a.pdjg='y'
and a.in_id = b.app_id
and b.flowid=c.flow_id
and b.creater=e.personid
and a.active='Y'
and a.createtime like '2008-02%'
);
最后的语句a.createtime like '2008-02%' 改为a.createtime like '2008-03%' 或a.createtime like '%2008-03%'
就出错ora-01722无效数字
a.createtime 为varchar2类型
这是为什么啊???
from ap_xmtpip a , ap_apply b , ap_flowinfo c,ro_person e
where
(
a.pdjg='y'
and a.in_id = b.app_id
and b.flowid=c.flow_id
and b.creater=e.personid
and a.active='Y'
and a.createtime like '2008-02%'
);
最后的语句a.createtime like '2008-02%' 改为a.createtime like '2008-03%' 或a.createtime like '%2008-03%'
就出错ora-01722无效数字
a.createtime 为varchar2类型
这是为什么啊???
把数据删掉大部分再试试
怀疑a.createtime like '2008-03%'先匹配后,其他字段出错
而a.createtime like '2008-02%'不匹配,就不会关联其他字段
and b.flowid=c.flow_id
and b.creater=e.personid
有没有字符串类型和数字类型匹配的?