Le 2016-09-06 09:24, Mélopie a écrit :
Bonjour Dany,Voici ce que j'obtiens: dossier25=# select jrn_def_id,jrn_def_name from jrn_def; jrn_def_id | jrn_def_name ------------+----------------------- 4 | Opération Diverses 2 | Vente 3 | Achat 5 | FinGiro 1 | FinGold 6 | BugShit Peut-on en déduire le fichier "efface.sql" suivant? begin; SET search_path TO comptaproc,public; delete from jrnx where j_jrn_def = BugShit ;
delete from jrnx where j_jrn_def = 6 ;
-- c'est le nom du journal à effacer parmi les journaux delete from jrnx where jr_def_id = 6 ; -- Là, c'est son identifiant delete from jrn_def where jrn_def_id = 6; commit;
C'est correct si on utilise toujours 6 à la place de BugShit :-) bat D --- NOALYSS est un Serveur de Comptabilité et de Gestion libre NOALYSS is an ERP Server opensource focused on accountancy
