Project

General

Profile

1
1) Salvare la risposta SOAP di Pimpa relativa agli ultimi anni
2
   - WSDL: http://pimpa.isti.cnr.it/PERSONALE/web-services/iop/iop.webservice.php?wsdl
3
   - Method: getDataRange
4

    
5
2) Eseguire l'xslt sulla risposta 
6

    
7
3) Ricreare o svuotare la tabella temporanea affiliations_temp
8
  - create table affiliations_temp(pid varchar(32), gid varchar(16), year int);
9

    
10
4) Importare le nuopvi affiliations sulla tabella temporanea 
11

    
12
5) Verificare che non esistano nuovi laboratori e/o nuove persone ed eventualmente inserirle una per una
13
   - select distinct t.pid, p.name, p.surname from affiliations_temp t left outer join persons p on (t.pid = p.id) where p.name IS NULL;
14
   - select distinct t.gid, g.name, g.type    from affiliations_temp t left outer join groups  g on (t.gid = g.id) where g.name IS NULL;
15

    
16
6) Copiare i dati dalla tabella temporanea
17
   - insert into affiliations(pid,gid,year) select pid,gid,year from affiliations_temp ON DUPLICATE KEY UPDATE affiliations.pid=affiliations_temp.pid;
18

    
19
7) Effettuare controlli a campione
20

    
21
8) Cancellare la tabella temporanea
22
   - drop table affiliations_temp;
23

    
24
9) Cancellare e/o correggere (se possibile) le affiliations UNKNOWN
25
   - select pid, group_concat(gid) from affiliations where year = _YEAR_ group by pid having group_concat(gid) like '%UNKNOWN%' and count(gid) > 1;
26
   - delete from affiliations where pid = '_ID_' and gid = 'UNKNOWN' and year = _YEAR_;
(2-2/2)