update F_USEABLE_FEE set a.admin_fee_rate=decode(b.product_id,13001,0.93,b.admin_fee_rate)
from F_USEABLE_FEE a,t_group_policy_product b
where a.product_id=b.product_id
and a.policy_id=b.policy_id
and a.product_id in (13001,13016,13035,13002,13029)总是提示在from的位置上,ORA-00933:语句没有正确结束。求助.............
from F_USEABLE_FEE a,t_group_policy_product b
where a.product_id=b.product_id
and a.policy_id=b.policy_id
and a.product_id in (13001,13016,13035,13002,13029)总是提示在from的位置上,ORA-00933:语句没有正确结束。求助.............
知道问题所在,你这个sql知道如何修改了吧!
from t_group_policy_product b
where a.product_id=b.product_id
and a.policy_id=b.policy_id
and a.product_id in (13001,13016,13035,13002,13029)也不行啊,奇怪
where 关联条件)
where exists(select 1 from from table2
where 关联条件);
from t_group_policy_product b )
where a.product_id=b.product_id
and a.policy_id=b.policy_id
and a.product_id in (13001,13016,13035,13002,13029)
看看这样行不行,没有update后面直接加from的
update F_USEABLE_FEE a
set a.admin_fee_rate = (select decode(b.product_id,
13001,
0.93,
b.admin_fee_rate)
from t_group_policy_product b
where a.product_id = b.product_id
and a.policy_id = b.policy_id)
where a.product_id in (13001, 13016, 13035, 13002, 13029);
3楼的语法是正确的
from F_USEABLE_FEE a,t_group_policy_product b
where a.product_id=b.product_id
and a.policy_id=b.policy_id
and a.product_id in (13001,13016,13035,13002,13029)
)没测试,你可以试下
update F_USEABLE_FEE a,t_group_policy_product b
set a.admin_fee_rate=decode(b.product_id,13001,0.93,b.admin_fee_rate)
where a.product_id=b.product_id
and a.policy_id=b.policy_id
and a.product_id in (13001,13016,13035,13002,13029)
where a.product_id=b.product_id
and a.policy_id=b.policy_id
and a.product_id in (13001,13016,13035,13002,13029)
这是什么时候的帖子了这是什么板块 MSQL or ORACLE……
from t_group_policy_product b
where a.product_id=b.product_id
and a.policy_id=b.policy_id )
where
a.product_id in (13001,13016,13035,13002,13029)
from F_USEABLE_FEE a,t_group_policy_product b
where a.product_id=b.product_id
and a.policy_id=b.policy_id
and a.product_id in (13001,13016,13035,13002,13029)
变成子查询
from F_USEABLE_FEE a,t_group_policy_product b
where a.product_id=b.product_id
and a.policy_id=b.policy_id
and a.product_id in (13001,13016,13035,13002,13029)
变成子查询
seta.admin_fee_rate=decode(b.product_id,13001,0.93,b.admin_fee_rate)
where a.product_id=b.product_id
and a.policy_id=b.policy_id
and a.product_idin(13001,13016,13035,13002,13029);