select t.policynum,
(select wmsys.wm_concat(c.countrycnname || '|' || c.countryenname) from webpos_country c
where c.countrycode in (
select 'aa' datafield3 from (select (select datafield3 from pos_policy_form where policynum=t.policynum) from dual)
)),
'Form ' || to_char(t.startdate, 'yyyy-mm-dd') || ' To ' ||to_char(t.enddate, 'yyyy-mm-dd'),to_char(t.startdate, 'yyyy-mm-dd'),t.summoney,t.policynum
from pos_policy_form t
where t.poscode = 'WP666666'
and t.sellformtype = 'UN075'
and t.operatorcode = '555555'
and t.batchnum = '86241300118960'
order by t.policynum 标识列无效 急急啊select
(select wmsys.wm_concat(c.countrycnname || '|' || c.countryenname) from webpos_country c
where c.countrycode in (
select 'aa' datafield3 from (select (select datafield3 from pos_policy_form where policynum=t.policynum) from dual)
)),
'Form ' || to_char(t.startdate, 'yyyy-mm-dd') || ' To ' ||to_char(t.enddate, 'yyyy-mm-dd'),to_char(t.startdate, 'yyyy-mm-dd'),t.summoney,t.policynum
from pos_policy_form t
where t.poscode = 'WP666666'
and t.sellformtype = 'UN075'
and t.operatorcode = '555555'
and t.batchnum = '86241300118960'
order by t.policynum 标识列无效 急急啊select
Cause: A required keyword is missing.
Action: Correct the syntax.
是因为你的子查询层次太深造成的, FROM pos_policy_form WHERE policynum = t.policynum 这里都已经是第三层了,需要减少层级。要么
c.countrycode IN ('aa')
要么
c.countrycode IN
( datafield3 FROM pos_policy_form WHERE policynum = t.policynum)