-- --------------------------------------------------------------- -- Sauvegarde du statut débitrice de la carte pour forcer les débits -- --------------------------------------------------------------- update operation_regul a, operation b, carte c , carte d set a.is_carte_emetteur_debitrice=c.is_debitrice, a.is_carte_recepteur_debitrice=d.is_debitrice where a.operation_id=b.id and b.carte_emettrice_id=c.id and b.carte_receptrice_id=d.id and a.type='C'; update carte a, operation b, operation_regul c set a.is_debitrice = true where c.operation_id=b.id and b.carte_emettrice_id=a.id and c.type='C'; -- --------------------------------------------------------------- -- Forcer les cartes à être débitrices -- --------------------------------------------------------------- update carte a, operation b, operation_regul c set a.is_debitrice = true where c.operation_id=b.id and b.carte_receptrice_id=a.id and c.type='C'; update carte a, operation b, operation_regul c set a.is_debitrice = true where c.operation_id=b.id and b.carte_emettrice_id=a.id and c.type='C';