MySQL : mémo perso : Nettoyage en pré-production

DELETE FROM INTERNETPROPOSANT WHERE IDPARTENAIRE<>578;
DELETE FROM INTERNETEMPRUNT WHERE IDINTERNETPROPOSANT
NOT IN (SELECT ID FROM INTERNETPROPOSANT);
DELETE FROM INTERNETEMPRUNTDECISIONMEDICALE WHERE
IDINTERNETEMPRUNT NOT IN (SELECT ID FROM INTERNETEMPRUNT);

UPDATE `INTERNETPROPOSANT`,`INTERNETEMPRUNT`
SET `INTERNETPROPOSANT`.`NOM`=
CONCAT_WS(",","NOM",
`INTERNETPROPOSANT`.`REFERENCEEXTERNE`,
`INTERNETEMPRUNT`.`NO_CONTRAT`),
`INTERNETPROPOSANT`.`PRENOM`=NULL,
`INTERNETPROPOSANT`.`NOTELEPHONE1`=NULL,
`INTERNETPROPOSANT`.`NOTELEPHONE2`=NULL,
`INTERNETPROPOSANT`.`NOTELEPHONE3`=NULL,
`INTERNETPROPOSANT`.`ADRESSE1`=NULL,
`INTERNETPROPOSANT`.`ADRESSE1`=NULL,
`INTERNETPROPOSANT`.`ADRESSE2`=NULL,
`INTERNETPROPOSANT`.`MOTDEPASSE`=NULL,
`INTERNETPROPOSANT`.`EMAIL`="monemailperso@gmail.com"
WHERE (`INTERNETPROPOSANT`.`ID` = `INTERNETEMPRUNT`.`IDINTERNETPROPOSANT`);

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.