Sync from remote server: 2025-10-12 18:56:41
This commit is contained in:
109
ATD/CANCELLA.m
Executable file
109
ATD/CANCELLA.m
Executable file
@@ -0,0 +1,109 @@
|
||||
DTcatena = input('Digitare il nome della catena: ','s');
|
||||
|
||||
dbname = 'ase_lar';
|
||||
username = 'matlab';
|
||||
password = 'Ase@2014';
|
||||
driver = 'com.mysql.jdbc.Driver';
|
||||
dburl = ['jdbc:mysql://160.78.21.55:3306/' dbname];
|
||||
tablename = 'ELABDATADISP';
|
||||
colnames = {'ToolNameID','NodeNum','EventDate','EventTime','XShift','YShift'};
|
||||
% javaclasspath('C:\Program Files\MATLAB\R2008a\java\mysql-connector-java-3.1.14-bin.jar');
|
||||
conn = database(dbname, username, password, driver, dburl);
|
||||
|
||||
comando = ['delete from ELABDATADISP where ToolNameID = ''' DTcatena ''''];
|
||||
curs = exec(conn,comando);
|
||||
close(conn)
|
||||
|
||||
%% Da una data
|
||||
dbname = 'ase_lar';
|
||||
username = 'matlab';
|
||||
password = 'Ase@2014';
|
||||
driver = 'com.mysql.jdbc.Driver';
|
||||
dburl = ['jdbc:mysql://160.78.30.106:3306/' dbname];
|
||||
|
||||
conn = database(dbname, username, password, driver, dburl);
|
||||
|
||||
IDcentralina = 'ID0079';
|
||||
DTcatena = 'DT0120';
|
||||
date = '2021-10-07';
|
||||
comando = ['delete from ELABDATADISP where UnitName = ''' IDcentralina ...
|
||||
''' and ToolNameID = ''' DTcatena ''' and EventDate >= ''' date ''' '];
|
||||
|
||||
curs = exec(conn,comando);
|
||||
close(conn)
|
||||
disp('Fatto')
|
||||
|
||||
%% 1
|
||||
dbname = 'ase_lar';
|
||||
username = 'matlab';
|
||||
password = 'Ase@2014';
|
||||
driver = 'com.mysql.jdbc.Driver';
|
||||
dburl = ['jdbc:mysql://160.78.30.106:3306/' dbname];
|
||||
|
||||
conn = database(dbname, username, password, driver, dburl);
|
||||
|
||||
IDcentralina = 'ID0063';
|
||||
DTcatena = 'DT0103';
|
||||
date = '2021-10-18';
|
||||
time = '00:00:01';
|
||||
|
||||
% comando = ['delete from ELABDATADISP where UnitName = ''' IDcentralina ...
|
||||
% ''' and ToolNameID = ''' DTcatena ''' and EventDate = ''' date ''' and EventTime > ''' time ''' '];
|
||||
|
||||
comando = ['delete from ELABDATADISP where UnitName = ''' IDcentralina ...
|
||||
''' and ToolNameID = ''' DTcatena ''' and EventDate >= ''' date ''' '];
|
||||
|
||||
curs = exec(conn,comando);
|
||||
close(conn)
|
||||
|
||||
disp('Fine!')
|
||||
|
||||
%% 2
|
||||
dbname = 'ase_lar';
|
||||
username = 'matlab';
|
||||
password = 'Ase@2014';
|
||||
driver = 'com.mysql.jdbc.Driver';
|
||||
dburl = ['jdbc:mysql://160.78.30.106:3306/' dbname];
|
||||
|
||||
conn = database(dbname, username, password, driver, dburl);
|
||||
|
||||
DTcatena = 'DT0046';
|
||||
IDcentralina = 'ID0150';
|
||||
comando = ['delete from ELABDATADISP where ToolNameID = ''' DTcatena ''' and UnitName = ''' IDcentralina ''' '];
|
||||
|
||||
curs = exec(conn,comando);
|
||||
close(conn)
|
||||
|
||||
disp('Fine!')
|
||||
|
||||
%% 3
|
||||
dbname = 'ase_lar';
|
||||
username = 'matlab';
|
||||
password = 'Ase@2014';
|
||||
driver = 'com.mysql.jdbc.Driver';
|
||||
dburl = ['jdbc:mysql://160.78.21.55:3306/' dbname];
|
||||
|
||||
conn = database(dbname, username, password, driver, dburl);
|
||||
|
||||
IDcentralina = 'ID0026';
|
||||
DTcatena = 'DT0042';
|
||||
date1 = '2019-02-20';
|
||||
date2 = '2019-05-13';
|
||||
comando = ['delete from ELABDATADISP where ToolNameID = ''' DTcatena ''' and Unitname = '''...
|
||||
IDcentralina ''' and EventDate >= ''' date1 ''' and EventDate < ''' date2 ''' '];
|
||||
|
||||
curs = exec(conn,comando);
|
||||
close(conn)
|
||||
|
||||
disp('Fine!')
|
||||
|
||||
%% 4
|
||||
INI = 1;
|
||||
for i = INI:INI+6
|
||||
DatiInPlaceLink(1,i) = cellstr(num2str(DatiRaw(end,i+1)));
|
||||
end
|
||||
|
||||
INI = 1;
|
||||
for i = INI:INI+5
|
||||
DatiInPlaceLinkHR(1,i) = cellstr(num2str(DatiRaw(end,i+1)));
|
||||
end
|
||||
Reference in New Issue
Block a user