1 2 3 4 5
|
INSERT INTO TB_DESTINATION_INVENTAIRE ( fk_mouvement_destination_inventaire, fk_departement_destination_inventaire, masse_entree_destination_inventaire, masse_sortie_destination_inventaire, masse_inventaire_destination_inventaire, nb_piece_entree_destination_inventaire, nb_piece_sortie_destination_inventaire, nb_piece_inventaire_destination_inventaire, visa_entree_destination_inventaire, visa_sortie_destination_inventaire )
SELECT TB_MOUVEMENTS.numero_mouvement, TB_DEPARTEMENTS.nom_departement, TB_DESTINATIONS.masse_entree_destination, TB_DESTINATIONS.masse_sortie_destination, TB_DESTINATIONS.masse_inventaire_destination, TB_DESTINATIONS.nb_piece_entree_destination, TB_DESTINATIONS.nb_piece_sortie_destination, TB_DESTINATIONS.nb_piece_inventaire_destination, TB_DESTINATIONS.visa_entree_destination, TB_DESTINATIONS.visa_sortie_destination
FROM TB_MOUVEMENTS RIGHT JOIN (TB_DEPARTEMENTS RIGHT JOIN TB_DESTINATIONS ON TB_DEPARTEMENTS.pk_departement=TB_DESTINATIONS.pk_fk_departement_destination) ON TB_MOUVEMENTS.pk_mouvement=TB_DESTINATIONS.pk_fk_mouvement_destination
WHERE visa_sortie_destination is not null; |
Partager