mysql触发器不支持动态sql

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 ;

时间: 2024-10-31 12:13:21

mysql触发器不支持动态sql的相关文章

MySQL 动态sql语句执行 用时间做表名

1. 描述 在使用数据的时候,我时候我们需要很多数据库,而且想用时间来做表名以区分.但是MySQL在存储过程中不支持使用变量名来做表名或者列名. 比如,有一个表我们想以"2015-07-16 12:00:00"命名. 2. 解决方案 如果只是更换一个普通的表名的话,很简单,直接使用下面sql语句即可: alter table old_table_name rename new_table_name 但是要以时间为表名,动态命名的话就不可以了.首先我们可以用NOW()函数获取系统当前的时

MySQL 动态sql语句运行 用时间做表名

1. 描写叙述 在使用数据的时候,我时候我们须要非常多数据库,并且想用时间来做表名以区分.可是MySQL在存储过程中不支持使用变量名来做表名或者列名. 比方,有一个表我们想以"2015-07-16 12:00:00"命名. 2. 解决方式 假设仅仅是更换一个普通的表名的话,非常easy.直接使用以下sql语句就可以: alter table old_table_name rename new_table_name 可是要以时间为表名,动态命名的话就不能够了.首先我们能够用NOW()函数

【转】mysql触发器的实战(触发器执行失败,sql会回滚吗)

1   引言 Mysql的触发器和存储过程一样,都是嵌入到mysql的一段程序.触发器是mysql5新增的功能,目前线上凤巢系统.北斗系统以及哥伦布系统使用的数据库均是mysql5.0.45版本,很多程序比如fc-star管理端,sfrd(das),dorado都会用到触发器程序,实现对于数据库增.删.改引起事件的关联操作.本文介绍了触发器的类型和基本使用方法,讲述了触发器使用中容易产生的误区,从mysql源码中得到触发器执行顺序的结论,本文最后是实战遭遇的触发器经典案例.没有特殊说明时,本文的

ORACLE数据库之PL/SQL触发器、rownum、动态SQL、数据库之视图与索引

WHEN子句说明触发约束条件.Condition为一个逻辑表达时,其中必须包含相关名称,而不能包含查询语句,也不能调用PL/SQL函数.WHEN子句指定的触发约束条件只能用在BEFORE和AFTER行触发器中,不能用在INSTEAD OF行触发器和其它类型的触发器中. -- 创建记录操作事件的表 CREATE TABLE event_table( event VARCHAR2(50), time DATE ); -- 创建触发器 CREATE OR REPLACE TRIGGER tr_star

mysql动态sql 整理多个字段

原始表: 整理后的表: 方案一(动态sql): BEGIN #Routine body goes here... DECLARE v1 int(3); DECLARE v2 int(3); #DECLARE v3 VARCHAR(15); #DECLARE vcompany VARCHAR(30); #DECLARE vname VARCHAR(30); DECLARE vcol VARCHAR(30); DECLARE tmp_sql VARCHAR(3000); DECLARE vid in

mysql基础-数据类型和sql模式-学习之(三)

0x01 mysql的两种方向: 开发DBA:数据库设计(E-R关系图).sql开发.内置函数.存储历程(存储过程和存储函数).触发器.时间调度器(event scheduler) 运维---->管理DBA:安装.升级.备份.恢复.用户管理.权限管理.监控.分析.基准测试,语句优化(SQL语句).数据字典,按需要配置服务器(服务器变量:MyISAM,InnoDB,缓存,日志)SQL 语言组成部分: DDL:数据定义语言 DML:数据操作语言 完整性定义语言,DDL的一部分功能 主键约束.外键约束

mysql触发器trigger 实例详解

MySQL好像从5.0.2版本就开始支持触发器的功能了,本次博客就来介绍一下触发器,首先还是谈下概念性的东西吧: 什么是触发器 触发器是与表有关的数据库对象,在满足定义条件时触发,并执行触发器中定义的语句集合.触发器的这种特性可以协助应用在数据库端确保数据的完整性. 举个例子,比如你现在有两个表[用户表]和[日志表],当一个用户被创建的时候,就需要在日志表中插入创建的log日志,如果在不使用触发器的情况下,你需要编写程序语言逻辑才能实现,但是如果你定义了一个触发器,触发器的作用就是当你在用户表中

MySql触发器使用讲解

林炳文Evankaka原创作品.转载请注明出处http://blog.csdn.net/evankaka 触发器(TRIGGER)是由事件来触发某个操作.这些事件包括INSERT语句.UPDATE语句和DELETE语句.当数据库系统执行这些事件时,就会激活触发器执行相应的操作.MySQL从5.0.2版本开始支持触发器.在本文中将讲解的内容包括:触发器的含义和作用如何创建触发器如何查看触发器如何删除触发器 触发器是由INSERT.UPDATE和DELETE等事件来触发某种特定操作.满足触发器的触发

Day4 MySql触发器视图索引以及设计优化

触发器 MySQL包含对触发器的支持.触发器是一种与表操作有关的数据库对象,当触发器所在表上出现指定事件时,将调用该对象,即表的操作事件触发表上的触发器的执行. 通过事件触发,不能传参 语法 CREATE [DEFINER = { user | CURRENT_USER }] TRIGGER trigger_name trigger_time trigger_event ON tbl_name FOR EACH ROW [trigger_order] trigger_body trigger_t