解决sql update 不能使用 cast convert函数

错误点

解决sql  update  不能使用 cast  convert函数


 update  lighting_weather_info set `status`=''  where weather_info_id in( select * from (select weather_info_id
 FROM lighting_weather_info
 WHERE (CONVERT(pa_hp,DECIMAL)>(select indexhightvalue
 FROM lighting_equipment_index
 WHERE indexcode='pa_hp') or CONVERT(pa_hp,DECIMAL) < (select indexlowvalue
 FROM lighting_equipment_index
 WHERE indexcode='pa_hp')) and equipmentid='AY1009' and (updatetime BETWEEN '2019-03-12 18:46:46' and '2019-12-12 18:46:46')) sd)

解决 在update之后 加上 IGNORE

解决sql  update  不能使用 cast  convert函数

  update **IGNORE** lighting_weather_info set `status`=''  where weather_info_id in( select * from (select weather_info_id
 FROM lighting_weather_info
 WHERE (CONVERT(pa_hp,DECIMAL)>(select indexhightvalue
 FROM lighting_equipment_index
 WHERE indexcode='pa_hp') or CONVERT(pa_hp,DECIMAL) < (select indexlowvalue
 FROM lighting_equipment_index
 WHERE indexcode='pa_hp')) and equipmentid='AY1009' and (updatetime BETWEEN '2019-03-12 18:46:46' and '2019-12-12 18:46:46')) sd)
 

增加也可以使用O

上一篇:3ds Max: Advanced Lighting 3DS Max 教程之高级灯光 Lynda课程中文字幕


下一篇:PRT(Precomputed Radiance Transfer)&球谐光照(Spherical Harmonic Lighting)