SHARE
TWEET

Untitled

a guest Jun 18th, 2019 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. /*AREA NUEVA*/
  4. SELECT * FROM TR31_AREA WHERE TR31_AREA.TR31_ID_PK >= 145 ORDER BY TR31_AREA.TR31_ID_PK ASC;
  5. SELECT * FROM TR31_AREA WHERE UPPER(TR31_AREA.TR31_NOMBRE) LIKE UPPER('%Preguntas%');
  6. /*
  7. 185 Preguntas Profundizaci贸n
  8. 145 1. Dimensi贸n Ocupaci贸n
  9. 167 2. Dimensi贸n Ingresos
  10. 147 3. Dimensi贸n Salud
  11. 148 4. Dimensi贸n Autonom铆a
  12. 165 5. Dimensi贸n Vivienda y Entorno
  13. */
  14.  
  15. /*RELACION AREA MODULO*/
  16. SELECT * FROM TR32_RL_MODULO_AREA WHERE TR32_RL_MODULO_AREA.TR04_CONVOCATORIA_FK = 9 AND TR32_RL_MODULO_AREA.TR31_AREA_FK >= 145 ORDER BY TR32_RL_MODULO_AREA.TR32_ORDEN ASC;
  17.  
  18. INSERT INTO TR32_RL_MODULO_AREA (TR29_MODULO_FK,TR31_AREA_FK,TR04_CONVOCATORIA_FK,TR01_VIGENCIA_FK,TR92_VISUALIZACION_FK,TR32_ORDEN) VALUES (9,(SELECT MAX(TR31_ID_PK) FROM TR31_AREA WHERE TR31_NOMBRE LIKE 'Preguntas Profundizaci贸n'),9,1,2,0);
  19. INSERT INTO TR32_RL_MODULO_AREA (TR29_MODULO_FK,TR31_AREA_FK,TR04_CONVOCATORIA_FK,TR01_VIGENCIA_FK,TR92_VISUALIZACION_FK,TR32_ORDEN) VALUES (9,(SELECT MAX(TR31_ID_PK) FROM TR31_AREA WHERE TR31_NOMBRE LIKE '1. Dimensi贸n Ocupaci贸n'),9,1,2,1);
  20. INSERT INTO TR32_RL_MODULO_AREA (TR29_MODULO_FK,TR31_AREA_FK,TR04_CONVOCATORIA_FK,TR01_VIGENCIA_FK,TR92_VISUALIZACION_FK,TR32_ORDEN) VALUES (9,(SELECT MAX(TR31_ID_PK) FROM TR31_AREA WHERE TR31_NOMBRE LIKE '2. Dimensi贸n Ingresos'),9,1,2,2);
  21. INSERT INTO TR32_RL_MODULO_AREA (TR29_MODULO_FK,TR31_AREA_FK,TR04_CONVOCATORIA_FK,TR01_VIGENCIA_FK,TR92_VISUALIZACION_FK,TR32_ORDEN) VALUES (9,(SELECT MAX(TR31_ID_PK) FROM TR31_AREA WHERE TR31_NOMBRE LIKE '3. Dimensi贸n Salud'),9,1,2,3);
  22. INSERT INTO TR32_RL_MODULO_AREA (TR29_MODULO_FK,TR31_AREA_FK,TR04_CONVOCATORIA_FK,TR01_VIGENCIA_FK,TR92_VISUALIZACION_FK,TR32_ORDEN) VALUES (9,(SELECT MAX(TR31_ID_PK) FROM TR31_AREA WHERE TR31_NOMBRE LIKE '4. Dimensi贸n Autonom铆a'),9,1,2,4);
  23. INSERT INTO TR32_RL_MODULO_AREA (TR29_MODULO_FK,TR31_AREA_FK,TR04_CONVOCATORIA_FK,TR01_VIGENCIA_FK,TR92_VISUALIZACION_FK,TR32_ORDEN) VALUES (9,(SELECT MAX(TR31_ID_PK) FROM TR31_AREA WHERE TR31_NOMBRE LIKE '5. Dimensi贸n Vivienda y Entorno'),9,1,2,5);
  24.  
  25.  
  26. /*MODULO*/
  27. SELECT * FROM TR29_MODULO -- Conociendo las 脕reas de Bienestar / 9
  28. SELECT * FROM TR14_ETAPA  -- Profundizaci贸n Diagn贸stica /2
  29. SELECT * FROM TR30_RL_ETAPA_MODULO
  30. WHERE TR30_RL_ETAPA_MODULO.TR04_CONVOCATORIA_FK = 9
  31. AND TR30_RL_ETAPA_MODULO.TR14_ETAPA_FK = 2
  32. AND TR30_RL_ETAPA_MODULO.TR29_MODULO_FK = 9 /*EXISTE RELACION ENTRE MODULO ETPATA PARA ESTA CONVOCATORIA = 97*/
  33.  
  34. /*FORMULARIO*/
  35. SELECT * FROM TR35_FORMULARIO WHERE UPPER(TR35_FORMULARIO.TR35_NOMBRE) LIKE UPPER('%Preguntas Profundizaci贸n%');
  36. SELECT * FROM TR35_FORMULARIO WHERE UPPER(TR35_FORMULARIO.TR35_NOMBRE) LIKE UPPER('%PREGUNTAS%');
  37. SELECT * FROM TR35_FORMULARIO WHERE TR35_FORMULARIO.TR35_ID_PK >= 353 AND TR35_FORMULARIO.TR35_ID_PK <= 358; -- Mayor: 336
  38.  
  39. INSERT INTO TR35_FORMULARIO (TR35_ID_PK,TR01_VIGENCIA_FK,TR35_NOMBRE,TR42_ESTADO_FK) VALUES (353, 1, 'Preguntas Profundizaci贸n',3);
  40. INSERT INTO TR35_FORMULARIO (TR35_ID_PK,TR01_VIGENCIA_FK,TR35_NOMBRE,TR42_ESTADO_FK) VALUES (354, 1, '1. Dimensi贸n Ocupaci贸n',3);
  41. INSERT INTO TR35_FORMULARIO (TR35_ID_PK,TR01_VIGENCIA_FK,TR35_NOMBRE,TR42_ESTADO_FK) VALUES (355, 1, '2. Dimensi贸n Ingresos',3);
  42. INSERT INTO TR35_FORMULARIO (TR35_ID_PK,TR01_VIGENCIA_FK,TR35_NOMBRE,TR42_ESTADO_FK) VALUES (356, 1, '3. Dimensi贸n Salud',3);
  43. INSERT INTO TR35_FORMULARIO (TR35_ID_PK,TR01_VIGENCIA_FK,TR35_NOMBRE,TR42_ESTADO_FK) VALUES (357, 1, '4. Dimensi贸n Autonom铆a',3);
  44. INSERT INTO TR35_FORMULARIO (TR35_ID_PK,TR01_VIGENCIA_FK,TR35_NOMBRE,TR42_ESTADO_FK) VALUES (358, 1, '5. Dimensi贸n Vivienda y Entorno',3);
  45.  
  46. /*FORMULARIO CONVOCATORIA*/
  47. SELECT * FROM TR120_RL_CONVO_FORMULARIO
  48. WHERE TR120_RL_CONVO_FORMULARIO.TR35_FORMULARIO_FK >= 353
  49. AND TR120_RL_CONVO_FORMULARIO.TR35_FORMULARIO_FK <= 358
  50. ORDER BY TR120_RL_CONVO_FORMULARIO.TR120_ID_PK ASC;
  51.  
  52. INSERT INTO TR120_RL_CONVO_FORMULARIO (TR04_CONVOCATORIA_FK,TR35_FORMULARIO_FK) VALUES (9, 353);
  53. INSERT INTO TR120_RL_CONVO_FORMULARIO (TR04_CONVOCATORIA_FK,TR35_FORMULARIO_FK) VALUES (9, 354);
  54. INSERT INTO TR120_RL_CONVO_FORMULARIO (TR04_CONVOCATORIA_FK,TR35_FORMULARIO_FK) VALUES (9, 355);
  55. INSERT INTO TR120_RL_CONVO_FORMULARIO (TR04_CONVOCATORIA_FK,TR35_FORMULARIO_FK) VALUES (9, 356);
  56. INSERT INTO TR120_RL_CONVO_FORMULARIO (TR04_CONVOCATORIA_FK,TR35_FORMULARIO_FK) VALUES (9, 357);
  57. INSERT INTO TR120_RL_CONVO_FORMULARIO (TR04_CONVOCATORIA_FK,TR35_FORMULARIO_FK) VALUES (9, 358);
  58.  
  59. /*FORMULARIO PERSONA*/
  60. SELECT * FROM TR86_FORMULARIO_TIPO_PERSONA WHERE TR86_FORMULARIO_TIPO_PERSONA.TR35_FORMULARIO_FK >= 353 AND TR86_FORMULARIO_TIPO_PERSONA.TR35_FORMULARIO_FK <= 358 ORDER BY TR86_ID_PK ASC;
  61.  
  62. INSERT INTO TR86_FORMULARIO_TIPO_PERSONA (TR35_FORMULARIO_FK,TR20_TIPO_PERSONA_FK,TR01_VIGENCIA_FK) VALUES (353, 5, 1);
  63. INSERT INTO TR86_FORMULARIO_TIPO_PERSONA (TR35_FORMULARIO_FK,TR20_TIPO_PERSONA_FK,TR01_VIGENCIA_FK) VALUES (354, 5, 1);
  64. INSERT INTO TR86_FORMULARIO_TIPO_PERSONA (TR35_FORMULARIO_FK,TR20_TIPO_PERSONA_FK,TR01_VIGENCIA_FK) VALUES (355, 5, 1);
  65. INSERT INTO TR86_FORMULARIO_TIPO_PERSONA (TR35_FORMULARIO_FK,TR20_TIPO_PERSONA_FK,TR01_VIGENCIA_FK) VALUES (356, 5, 1);
  66. INSERT INTO TR86_FORMULARIO_TIPO_PERSONA (TR35_FORMULARIO_FK,TR20_TIPO_PERSONA_FK,TR01_VIGENCIA_FK) VALUES (357, 5, 1);
  67. INSERT INTO TR86_FORMULARIO_TIPO_PERSONA (TR35_FORMULARIO_FK,TR20_TIPO_PERSONA_FK,TR01_VIGENCIA_FK) VALUES (358, 5, 1);
  68.  
  69. /*MODULO FORMULARIO*/
  70.  
  71. SELECT * FROM TR36_RL_MODULO_FORMULARIO WHERE TR36_RL_MODULO_FORMULARIO.TR35_FORMULARIO_FK >= 353
  72.  
  73. INSERT INTO TR36_RL_MODULO_FORMULARIO (TR29_MODULO_FK,TR35_FORMULARIO_FK,TR04_CONVOCATORIA_FK,TR01_VIGENCIA_FK) VALUES (9, 353, 9, 1);
  74. INSERT INTO TR36_RL_MODULO_FORMULARIO (TR29_MODULO_FK,TR35_FORMULARIO_FK,TR04_CONVOCATORIA_FK,TR01_VIGENCIA_FK) VALUES (9, 354, 9, 1);
  75. INSERT INTO TR36_RL_MODULO_FORMULARIO (TR29_MODULO_FK,TR35_FORMULARIO_FK,TR04_CONVOCATORIA_FK,TR01_VIGENCIA_FK) VALUES (9, 355, 9, 1);
  76. INSERT INTO TR36_RL_MODULO_FORMULARIO (TR29_MODULO_FK,TR35_FORMULARIO_FK,TR04_CONVOCATORIA_FK,TR01_VIGENCIA_FK) VALUES (9, 356, 9, 1);
  77. INSERT INTO TR36_RL_MODULO_FORMULARIO (TR29_MODULO_FK,TR35_FORMULARIO_FK,TR04_CONVOCATORIA_FK,TR01_VIGENCIA_FK) VALUES (9, 357, 9, 1);
  78. INSERT INTO TR36_RL_MODULO_FORMULARIO (TR29_MODULO_FK,TR35_FORMULARIO_FK,TR04_CONVOCATORIA_FK,TR01_VIGENCIA_FK) VALUES (9, 358, 9, 1);
  79.  
  80. INSERT INTO TR37_RL_AREA_FORMULARIO (TR31_AREA_FK,TR35_FORMULARIO_FK,TR04_CONVOCATORIA_FK,TR01_VIGENCIA_FK) VALUES ((SELECT MAX(TR31_ID_PK) FROM TR31_AREA WHERE TR31_NOMBRE LIKE 'Preguntas Profundizaci贸n'),353,9,1);
  81. INSERT INTO TR37_RL_AREA_FORMULARIO (TR31_AREA_FK,TR35_FORMULARIO_FK,TR04_CONVOCATORIA_FK,TR01_VIGENCIA_FK) VALUES ((SELECT MAX(TR31_ID_PK) FROM TR31_AREA WHERE TR31_NOMBRE LIKE '1. Dimensi贸n Ocupaci贸n'),354,9,1);
  82. INSERT INTO TR37_RL_AREA_FORMULARIO (TR31_AREA_FK,TR35_FORMULARIO_FK,TR04_CONVOCATORIA_FK,TR01_VIGENCIA_FK) VALUES ((SELECT MAX(TR31_ID_PK) FROM TR31_AREA WHERE TR31_NOMBRE LIKE '2. Dimensi贸n Ingresos'),355,9,1);
  83. INSERT INTO TR37_RL_AREA_FORMULARIO (TR31_AREA_FK,TR35_FORMULARIO_FK,TR04_CONVOCATORIA_FK,TR01_VIGENCIA_FK) VALUES ((SELECT MAX(TR31_ID_PK) FROM TR31_AREA WHERE TR31_NOMBRE LIKE '3. Dimensi贸n Salud'),356,9,1);
  84. INSERT INTO TR37_RL_AREA_FORMULARIO (TR31_AREA_FK,TR35_FORMULARIO_FK,TR04_CONVOCATORIA_FK,TR01_VIGENCIA_FK) VALUES ((SELECT MAX(TR31_ID_PK) FROM TR31_AREA WHERE TR31_NOMBRE LIKE '4. Dimensi贸n Autonom铆a'),357,9,1);
  85. INSERT INTO TR37_RL_AREA_FORMULARIO (TR31_AREA_FK,TR35_FORMULARIO_FK,TR04_CONVOCATORIA_FK,TR01_VIGENCIA_FK) VALUES ((SELECT MAX(TR31_ID_PK) FROM TR31_AREA WHERE TR31_NOMBRE LIKE '5. Dimensi贸n Vivienda y Entorno'),358,9,1);
  86.  
  87. /*AREA MODULO*/
  88.  
  89. SELECT * FROM TR37_RL_AREA_FORMULARIO WHERE TR37_RL_AREA_FORMULARIO.TR35_FORMULARIO_FK >= 353
  90.  
  91. /*FORM: PREGUNTAS PROFUNDIZACI脫N*/
  92.  
  93. /*CONTENEDOR*/
  94. SELECT * FROM MDS_CCV_CALLE.TR88_CONTENEDOR WHERE TR88_CONTENEDOR.TR88_TEXTO_VISIBLE LIKE '%V18PD%' ORDER BY TR88_CONTENEDOR.TR88_ID_PK DESC; -- 47796
  95.  
  96. /*FORMULARIO CONTENEDOR*/
  97. SELECT * FROM MDS_CCV_CALLE.TR89_RL_FORMULARIO_CONTENEDOR WHERE TR89_RL_FORMULARIO_CONTENEDOR.TR35_FORMULARIO_FK >= 353
  98.  
  99. /*PREGUNTA*/
  100. SELECT * FROM MDS_CCV_CALLE.TR33_PREGUNTA WHERE TR33_PREGUNTA.TR33_TEXTO_PREGUNTA LIKE '%V18PD%'
  101.  
  102. /*CAMPO*/
  103. SELECT * FROM MDS_CCV_CALLE.TR34_CAMPO WHERE TR34_CAMPO.TR34_NOMBRE LIKE '%V18PD%' -- 10369
  104.  
  105. /*RESPUESTA*/
  106. SELECT * FROM MDS_CCV_CALLE.TR41_RESPUESTA WHERE TR41_RESPUESTA.TR34_CAMPO_FK >= 10369
  107. SELECT * FROM MDS_CCV_CALLE.TR41_RESPUESTA WHERE UPPER(TR41_RESPUESTA.TR41_TEXTO) LIKE UPPER('%FECHA%')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top