mysql触发器不支持动态sql

原创 2016年04月20日 09:14:38
drop trigger if exists tri_*
DELIMITER //
create trigger tri_* before update
on pointtable for each row
begin
   if exists (select pointname from pointtable where pointname=new.pointname)
    then
        select pointtable,pointid into @pointtablename,@pointid from pointtable where pointname = new.pointname;
        if @pointid=1
			then
				insert into point_1(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
		    elseif @pointid=2
            then
    			insert into point_2(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=3   
    		then
    		  insert into point_3  (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=4   
    		then
    		  insert into point_4  (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=5   
    		then
    		  insert into point_5  (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=6   
    		then
    		  insert into point_6  (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=7   
    		then
    		  insert into point_7  (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=8   
    		then
    		  insert into point_8  (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=9   
    		then
    		  insert into point_9  (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=10  
    		then
    		  insert into point_10 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=11  
    		then
    		  insert into point_11 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=12  
    		then
    		  insert into point_12 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=13  
    		then
    		  insert into point_13 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=14  
    		then
    		  insert into point_14 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=15  
    		then
    		  insert into point_15 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=16  
    		then
    		  insert into point_16 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=17  
    		then
    		  insert into point_17 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=18  
    		then
    		  insert into point_18 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=19  
    		then
    		  insert into point_19 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=20  
    		then
    		  insert into point_20 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=21  
    		then
    		  insert into point_21 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=22  
    		then
    		  insert into point_22 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=23  
    		then
    		  insert into point_23 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=24  
    		then
    		  insert into point_24 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=25  
    		then
    		  insert into point_25 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=26  
    		then
    		  insert into point_26 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=27  
    		then
    		  insert into point_27 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=28  
    		then
    		  insert into point_28 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=29  
    		then
    		  insert into point_29 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=30  
    		then
    		  insert into point_30 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=31  
    		then
    		  insert into point_31 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=32  
    		then
    		  insert into point_32 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=33  
    		then
    		  insert into point_33 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=34  
    		then
    		  insert into point_34 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=35  
    		then
    		  insert into point_35 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=36  
    		then
    		  insert into point_36 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=37  
    		then
    		  insert into point_37 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=38  
    		then
    		  insert into point_38 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=39  
    		then
    		  insert into point_39 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=40  
    		then
    		  insert into point_40 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=41  
    		then
    		  insert into point_41 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=42  
    		then
    		  insert into point_42 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=43  
    		then
    		  insert into point_43 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=44  
    		then
    		  insert into point_44 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=45  
    		then
    		  insert into point_45 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=46  
    		then
    		  insert into point_46 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=47  
    		then
    		  insert into point_47 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=48  
    		then
    		  insert into point_48 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=49  
    		then
    		  insert into point_49 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=50  
    		then
    		  insert into point_50 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=51  
    		then
    		  insert into point_51 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=52  
    		then
    		  insert into point_52 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=53  
    		then
    		  insert into point_53 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=54  
    		then
    		  insert into point_54 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=55  
    		then
    		  insert into point_55 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=56  
    		then
    		  insert into point_56 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=57  
    		then
    		  insert into point_57 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=58  
    		then
    		  insert into point_58 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=59  
    		then
    		  insert into point_59 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=60  
    		then
    		  insert into point_60 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=61  
    		then
    		  insert into point_61 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=62  
    		then
    		  insert into point_62 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=63  
    		then
    		  insert into point_63 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=64  
    		then
    		  insert into point_64 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=65  
    		then
    		  insert into point_65 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=66  
    		then
    		  insert into point_66 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=67  
    		then
    		  insert into point_67 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=68  
    		then
    		  insert into point_68 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=69  
    		then
    		  insert into point_69 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=70  
    		then
    		  insert into point_70 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=71  
    		then
    		  insert into point_71 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=72  
    		then
    		  insert into point_72 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=73  
    		then
    		  insert into point_73 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=74  
    		then
    		  insert into point_74 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=75  
    		then
    		  insert into point_75 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=76  
    		then
    		  insert into point_76 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=77  
    		then
    		  insert into point_77 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=78  
    		then
    		  insert into point_78 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=79  
    		then
    		  insert into point_79 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=80  
    		then
    		  insert into point_80 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=81  
    		then
    		  insert into point_81 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=82  
    		then
    		  insert into point_82 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=83  
    		then
    		  insert into point_83 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=84  
    		then
    		  insert into point_84 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=85  
    		then
    		  insert into point_85 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=86  
    		then
    		  insert into point_86 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=87  
    		then
    		  insert into point_87 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=88  
    		then
    		  insert into point_88 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=89  
    		then
    		  insert into point_89 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=90  
    		then
    		  insert into point_90 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=91  
    		then
    		  insert into point_91 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=92  
    		then
    		  insert into point_92 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=93  
    		then
    		  insert into point_93 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=94  
    		then
    		  insert into point_94 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=95  
    		then
    		  insert into point_95 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=96  
    		then
    		  insert into point_96 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=97  
    		then
    		  insert into point_97 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=98  
    		then
    		  insert into point_98 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=99  
    		then
    		  insert into point_99 (sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=100 
    		then
    		  insert into point_100(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=101 
    		then
    		  insert into point_101(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=102 
    		then
    		  insert into point_102(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=103 
    		then
    		  insert into point_103(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=104 
    		then
    		  insert into point_104(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=105 
    		then
    		  insert into point_105(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=106 
    		then
    		  insert into point_106(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=107 
    		then
    		  insert into point_107(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=108 
    		then
    		  insert into point_108(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=109 
    		then
    		  insert into point_109(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=110 
    		then
    		  insert into point_110(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=111 
    		then
    		  insert into point_111(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=112 
    		then
    		  insert into point_112(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=113 
    		then
    		  insert into point_113(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=114 
    		then
    		  insert into point_114(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=115 
    		then
    		  insert into point_115(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=116 
    		then
    		  insert into point_116(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=117 
    		then
    		  insert into point_117(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=118 
    		then
    		  insert into point_118(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=119 
    		then
    		  insert into point_119(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=120 
    		then
    		  insert into point_120(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=121 
    		then
    		  insert into point_121(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=122 
    		then
    		  insert into point_122(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=123 
    		then
    		  insert into point_123(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=124 
    		then
    		  insert into point_124(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=125 
    		then
    		  insert into point_125(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=126 
    		then
    		  insert into point_126(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=127 
    		then
    		  insert into point_127(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=128 
    		then
    		  insert into point_128(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=129 
    		then
    		  insert into point_129(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=130 
    		then
    		  insert into point_130(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=131 
    		then
    		  insert into point_131(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=132 
    		then
    		  insert into point_132(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=133 
    		then
    		  insert into point_133(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=134 
    		then
    		  insert into point_134(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=135 
    		then
    		  insert into point_135(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=136 
    		then
    		  insert into point_136(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=137 
    		then
    		  insert into point_137(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=138 
    		then
    		  insert into point_138(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=139 
    		then
    		  insert into point_139(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=140 
    		then
    		  insert into point_140(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=141 
    		then
    		  insert into point_141(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=142 
    		then
    		  insert into point_142(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=143 
    		then
    		  insert into point_143(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=144 
    		then
    		  insert into point_144(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=145 
    		then
    		  insert into point_145(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=146 
    		then
    		  insert into point_146(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=147 
    		then
    		  insert into point_147(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=148 
    		then
    		  insert into point_148(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=149 
    		then
    		  insert into point_149(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=150 
    		then
    		  insert into point_150(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=151 
    		then
    		  insert into point_151(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=152 
    		then
    		  insert into point_152(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=153 
    		then
    		  insert into point_153(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=154 
    		then
    		  insert into point_154(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=155 
    		then
    		  insert into point_155(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=156 
    		then
    		  insert into point_156(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=157 
    		then
    		  insert into point_157(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=158 
    		then
    		  insert into point_158(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=159 
    		then
    		  insert into point_159(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=160 
    		then
    		  insert into point_160(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=161 
    		then
    		  insert into point_161(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=162 
    		then
    		  insert into point_162(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=163 
    		then
    		  insert into point_163(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=164 
    		then
    		  insert into point_164(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=165 
    		then
    		  insert into point_165(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=166 
    		then
    		  insert into point_166(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=167 
    		then
    		  insert into point_167(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=168 
    		then
    		  insert into point_168(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=169 
    		then
    		  insert into point_169(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=170 
    		then
    		  insert into point_170(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=171 
    		then
    		  insert into point_171(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=172 
    		then
    		  insert into point_172(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=173 
    		then
    		  insert into point_173(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=174 
    		then
    		  insert into point_174(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=175 
    		then
    		  insert into point_175(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=176 
    		then
    		  insert into point_176(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=177 
    		then
    		  insert into point_177(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=178 
    		then
    		  insert into point_178(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=179 
    		then
    		  insert into point_179(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=180 
    		then
    		  insert into point_180(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=181 
    		then
    		  insert into point_181(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=182 
    		then
    		  insert into point_182(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=183 
    		then
    		  insert into point_183(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=184 
    		then
    		  insert into point_184(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=185 
    		then
    		  insert into point_185(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=186 
    		then
    		  insert into point_186(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=187 
    		then
    		  insert into point_187(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=188 
    		then
    		  insert into point_188(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=189 
    		then
    		  insert into point_189(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=190 
    		then
    		  insert into point_190(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=191 
    		then
    		  insert into point_191(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=192 
    		then
    		  insert into point_192(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=193 
    		then
    		  insert into point_193(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=194 
    		then
    		  insert into point_194(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=195 
    		then
    		  insert into point_195(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=196 
    		then
    		  insert into point_196(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=197 
    		then
    		  insert into point_197(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=198 
    		then
    		  insert into point_198(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=199 
    		then
    		  insert into point_199(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=200 
    		then
    		  insert into point_200(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=201 
    		then
    		  insert into point_201(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=202 
    		then
    		  insert into point_202(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=203 
    		then
    		  insert into point_203(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=204 
    		then
    		  insert into point_204(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=205 
    		then
    		  insert into point_205(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=206 
    		then
    		  insert into point_206(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=207 
    		then
    		  insert into point_207(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=208 
    		then
    		  insert into point_208(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=209 
    		then
    		  insert into point_209(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=210 
    		then
    		  insert into point_210(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=211 
    		then
    		  insert into point_211(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=212 
    		then
    		  insert into point_212(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=213 
    		then
    		  insert into point_213(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=214 
    		then
    		  insert into point_214(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=215 
    		then
    		  insert into point_215(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=216 
    		then
    		  insert into point_216(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=217 
    		then
    		  insert into point_217(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=218 
    		then
    		  insert into point_218(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=219 
    		then
    		  insert into point_219(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=220 
    		then
    		  insert into point_220(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=221 
    		then
    		  insert into point_221(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=222 
    		then
    		  insert into point_222(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=223 
    		then
    		  insert into point_223(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=224 
    		then
    		  insert into point_224(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=225 
    		then
    		  insert into point_225(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=226 
    		then
    		  insert into point_226(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=227 
    		then
    		  insert into point_227(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=228 
    		then
    		  insert into point_228(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=229 
    		then
    		  insert into point_229(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=230 
    		then
    		  insert into point_230(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=231 
    		then
    		  insert into point_231(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=232 
    		then
    		  insert into point_232(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=233 
    		then
    		  insert into point_233(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=234 
    		then
    		  insert into point_234(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=235 
    		then
    		  insert into point_235(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=236 
    		then
    		  insert into point_236(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=237 
    		then
    		  insert into point_237(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=238 
    		then
    		  insert into point_238(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=239 
    		then
    		  insert into point_239(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=240 
    		then
    		  insert into point_240(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=241 
    		then
    		  insert into point_241(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=242 
    		then
    		  insert into point_242(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=243 
    		then
    		  insert into point_243(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=244 
    		then
    		  insert into point_244(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=245 
    		then
    		  insert into point_245(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=246 
    		then
    		  insert into point_246(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=247 
    		then
    		  insert into point_247(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=248 
    		then
    		  insert into point_248(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=249 
    		then
    		  insert into point_249(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=250 
    		then
    		  insert into point_250(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=251 
    		then
    		  insert into point_251(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=252 
    		then
    		  insert into point_252(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=253 
    		then
    		  insert into point_253(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=254 
    		then
    		  insert into point_254(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=255 
    		then
    		  insert into point_255(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=256 
    		then
    		  insert into point_256(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=257 
    		then
    		  insert into point_257(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=258 
    		then
    		  insert into point_258(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=259 
    		then
    		  insert into point_259(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=260 
    		then
    		  insert into point_260(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=261 
    		then
    		  insert into point_261(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=262 
    		then
    		  insert into point_262(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=263 
    		then
    		  insert into point_263(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=264 
    		then
    		  insert into point_264(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=265 
    		then
    		  insert into point_265(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=266 
    		then
    		  insert into point_266(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=267 
    		then
    		  insert into point_267(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=268 
    		then
    		  insert into point_268(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=269 
    		then
    		  insert into point_269(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=270 
    		then
    		  insert into point_270(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=271 
    		then
    		  insert into point_271(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=272 
    		then
    		  insert into point_272(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=273 
    		then
    		  insert into point_273(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=274 
    		then
    		  insert into point_274(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=275 
    		then
    		  insert into point_275(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=276 
    		then
    		  insert into point_276(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=277 
    		then
    		  insert into point_277(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=278 
    		then
    		  insert into point_278(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=279 
    		then
    		  insert into point_279(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=280 
    		then
    		  insert into point_280(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=281 
    		then
    		  insert into point_281(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=282 
    		then
    		  insert into point_282(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=283 
    		then
    		  insert into point_283(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=284 
    		then
    		  insert into point_284(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=285 
    		then
    		  insert into point_285(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=286 
    		then
    		  insert into point_286(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=287 
    		then
    		  insert into point_287(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=288 
    		then
    		  insert into point_288(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=289 
    		then
    		  insert into point_289(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=290 
    		then
    		  insert into point_290(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=291 
    		then
    		  insert into point_291(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=292 
    		then
    		  insert into point_292(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=293 
    		then
    		  insert into point_293(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=294 
    		then
    		  insert into point_294(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=295 
    		then
    		  insert into point_295(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=296 
    		then
    		  insert into point_296(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=297 
    		then
    		  insert into point_297(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=298 
    		then
    		  insert into point_298(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=299 
    		then
    		  insert into point_299(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    		elseif @pointid=300 
    		then
    		  insert into point_300(sqtname,value,datetime,date,time) values(new.sqtname,new.value,new.datetime,DATE_FORMAT( new.datetime, '%Y-%m-%d'),DATE_FORMAT( new.datetime, '%h:%i:%s'));
    end if;
end;
//
DELIMITER ;


版权声明:本文为博主原创文章,未经博主允许不得转载。如有问题请联系swazer_z@126.com

相关文章推荐

mysql 触发器中操作 动态表名 的解决办法

PREPARE statement_name FROM sql_text   /*定义*/  EXECUTE statement_name [USING variable [,variable....

MySQL触发器Trigger实例篇

MySQL触发器Trigger实例篇 发表于668 天前 ⁄ IT技术 ⁄ 暂无评论 以前关注的数据存储过程不太懂其中奥妙,最近遇到跨数据库,同时对多个表进行CURD(Create...
  • hireboy
  • hireboy
  • 2014年01月10日 11:45
  • 26158

MySQL——触发器的创建和使用总结

什么是触发器 触发器(TRIGGER)是MySQL的数据库对象之一,从5.0.2版本开始支持。该对象与编程语言中的函数非常类似,都需要声明、执行等。但是触发器的执行不是由程序调用,也不是由手工启动,...

“不返回任何键列信息的SelectCommand不支持UpdateCommand的动态SQL生成”问题

“不返回任何键列信息的SelectCommand不支持UpdateCommand的动态SQL生成”问题   2008-11-14 22:09:22|  分类: ADO.NET|字号 订阅 ...

使用JOOQ seek语句及动态SQL重写MySQL分页逻辑

众所周知,MySQL在数据量很大的时候查询的效率是很低的,因为假如你需要OFFSET 100000 LIMIT 5这样的数据,数据库就需要跳过前100000条数据,才能返回给你你需要的5条数据。由于数...

mysql中用光标循环中使用动态sql

需求: A表 id L_id a b c 1    11 1 2 3 2    11 2 3 4 3    12 5 6 7 B表 L_id name text(存A表字段名,数量不定) 11  ...

mysql的动态sql实现变量表名及占位符的使用

MySQL 在存储过程中是不支持直接使用变量名作为表名或者是列名的,而在实际的应用中确实会用到变表名或者变量名的情况,如数据量很大的时候就会用到分表。通过在网上查了mysql 5.1以上的版本提供了p...

mysql 存储过程动态sql

DROP PROCEDURE IF EXISTS PRO_STA_SYSTEM_ORDER_STATE; DELIMITER // CREATE DEFINER=`root`@`%` PROCED...

动态SQL语句--mysql--mybaits-

mybatis动态SQL语句 动态SQL语句 转载:http://zhaohaolin.iteye.com/blog/1030235         ...

MySQL - 动态SQL与预处理语句

在存储过程或者函数中,有时SQL语句是通过变量传值生成的。这时候就需要使用动态SQL,如果直接在SQL语句中植入变量,将提示无该字段或表。如下所示:v_db 和v_table均是变量传值动态生成。cr...
  • J080624
  • J080624
  • 2017年07月21日 10:22
  • 314
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:mysql触发器不支持动态sql
举报原因:
原因补充:

(最多只允许输入30个字)