DQL – Lister les dossiers vides et non vides

Parc2ee_admin

DQL – Lister les dossiers vides et non vides

Lister les dossiers vides :
select r_object_id, r_folder_path from dm_folder where r_object_id not in(select r_object_id from dm_folder where r_object_id in (select i_ancestor_id from dm_folder folders, dm_document docs where any docs.i_folder_id = folders.r_object_id group by i_ancestor_id having count(docs.r_object_id) > 0)) order by r_folder_path;

Lister les dossiers non vides :
select r_object_id, r_folder_path from dm_folder where r_object_id in (select i_ancestor_id from dm_folder folders, dm_document docs where any docs.i_folder_id = folders.r_object_id group by i_ancestor_id having count(docs.r_object_id) > 0) order by r_folder_path;

À propos de l’auteur

c2ee_admin administrator