select cast(`a`.`status` AS SIGNED INTEGER) AS `status`,`a`.`TAGNAME` AS `TAGNAME` from 
   (select truncate(`v_mes_snapshots`.`numbervalue`,0) AS `status`,
                    `v_mes_snapshots`.`TAGNAME` AS `TAGNAME` from `mysql`.`v_mes_snapshots` where (`v_mes_snapshots`.`TAGNAME` in ('XLTPS_ZYB1_066','XLTPS_ZYB2_070','XLTPS_ZYB3_070','XLTPS_CQB1_066','XLTPS_CQB2_070','XLTPS_CQB3_070','XLTTF_1djyxzs','XLTTF_2djyxzs','XLTTF_3djyxzs','XLTTF_4djyxzs','XLTGD_ZYD1_MN01','XLTGD_ZYD7_MN01'))) `a` union select `b`.`status` AS `status`,`b`.`TAGNAME` AS `TAGNAME` from (select (`b`.`status` or `c`.`status`) AS `status`,'TAGNAME1' AS `TAGNAME` from ((select truncate(`v_mes_snapshots`.`numbervalue`,0) AS `status`,`v_mes_snapshots`.`TAGNAME` AS `TAGNAME` from `mysql`.`v_mes_snapshots` where (`v_mes_snapshots`.`TAGNAME` = 'XLTTF_1djyxzs')) `b` join (select truncate(`v_mes_snapshots`.`numbervalue`,0) AS `status`,`v_mes_snapshots`.`TAGNAME` AS `TAGNAME` from `mysql`.`v_mes_snapshots` where (`v_mes_snapshots`.`TAGNAME` = 'XLTTF_2djyxzs')) `c`)) `b` union select `c`.`status` AS `status`,`c`.`TAGNAME` AS `TAGNAME` from (select (`b`.`status` or `c`.`status`) AS `status`,'TAGNAME2' AS `TAGNAME` from ((select truncate(`v_mes_snapshots`.`numbervalue`,0) AS `status`,`v_mes_snapshots`.`TAGNAME` AS `TAGNAME` from `mysql`.`v_mes_snapshots` where (`v_mes_snapshots`.`TAGNAME` = 'XLTTF_3djyxzs')) `b` join (select truncate(`v_mes_snapshots`.`numbervalue`,0) AS `status`,`v_mes_snapshots`.`TAGNAME` AS `TAGNAME` from `mysql`.`v_mes_snapshots` where (`v_mes_snapshots`.`TAGNAME` = 'XLTTF_4djyxzs')) `c`)) `c`
   

cast(`a`.`status` AS SIGNED INTEGER) AS `status`

posted on 2024-04-10 09:38  坚持就有光  阅读(20)  评论(0编辑  收藏  举报