-- =====================================================
-- 00b_diagnostico_menu_completo.sql
-- Ejecutar en la BD ANTERIOR para ver TODOS los menús
-- =====================================================

USE [Sis2000]; -- Cambiar si aplica
GO

-- Ver todos los programas (menú principal nuevo sistema)
SELECT 'seprogramas' AS tabla, cprograma, xprograma, xruta, istatus
FROM seprogramas
ORDER BY cprograma;
GO

-- Ver todos los subprogramas
SELECT 'sesubprog' AS tabla, cprograma, csubprograma, xsubprograma, xruta
FROM sesubprog
ORDER BY cprograma, csubprograma;
GO

-- Ver tablas del sistema ANTIGUO de menú (si existen)
IF OBJECT_ID('semenuprincipal') IS NOT NULL
    SELECT 'semenuprincipal' AS tabla, * FROM semenuprincipal WHERE istatus = 'V';
GO

IF OBJECT_ID('semenu') IS NOT NULL
    SELECT 'semenu' AS tabla, * FROM semenu WHERE istatus = 'V';
GO

IF OBJECT_ID('sesubmenu') IS NOT NULL
    SELECT 'sesubmenu' AS tabla, * FROM sesubmenu WHERE istatus = 'V';
GO
