oracle update 出错问题
updateM_VEH_CHARGE_REALAset(CHARGE_STATUS,CHARGE_TIME,YGZDD,POWER_STATION_NO,WHETHER_...
update M_VEH_CHARGE_REAL A set (CHARGE_STATUS ,CHARGE_TIME ,YGZDD , POWER_STATION_NO , WHETHER_BATTERY ,BATTERYBOX_NO , VOLT , CUR) =
select(CHAGRGEPOLE_STATUS , CHARGE_TIME ,YGZDD , POWER_STATION_NO , WHETHER_BATTERY , VOLT , CUR)
from (select rownum rn,t.* from M_CHARGEPOLE_REAL t where CHARGEPOLE_NO in (select EQUIP_NO from D_STAKE_ARCH where STAKE_PARA_ID = '3') order by CHARGEPOLE_NO) B ,
(select rownum rn,z.EQUIP_NO from D_CHG_ENG_ARCH z order by EQUIP_NO where CHG_ENG_PARA_ID = '5') C where B.rn=C.rn and A.CHARGE_NO = C.EQUIP_NO
错误信息 UPDATE ... SET expression must be a subquery 展开
select(CHAGRGEPOLE_STATUS , CHARGE_TIME ,YGZDD , POWER_STATION_NO , WHETHER_BATTERY , VOLT , CUR)
from (select rownum rn,t.* from M_CHARGEPOLE_REAL t where CHARGEPOLE_NO in (select EQUIP_NO from D_STAKE_ARCH where STAKE_PARA_ID = '3') order by CHARGEPOLE_NO) B ,
(select rownum rn,z.EQUIP_NO from D_CHG_ENG_ARCH z order by EQUIP_NO where CHG_ENG_PARA_ID = '5') C where B.rn=C.rn and A.CHARGE_NO = C.EQUIP_NO
错误信息 UPDATE ... SET expression must be a subquery 展开
1个回答
2015-10-19
展开全部
select的字段不需要括号,select本身需要
=(select CHAGRGEPOLE_STATUS , CHAR。。。C.EQUIP_NO)
=(select CHAGRGEPOLE_STATUS , CHAR。。。C.EQUIP_NO)
更多追问追答
追问
更改后出现ORA-00905: missing keyword
追答
update6个字段,select5个字段
B里面为什么要order by?
C里面为什么要order by,就算要,where和order by反了
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询