{"id":14274,"date":"2023-02-28T13:21:56","date_gmt":"2023-02-28T19:21:56","guid":{"rendered":"http:\/\/201.237.206.56\/Sitios\/ugit.siua.ac.cr\/?p=14274"},"modified":"2023-03-02T09:40:37","modified_gmt":"2023-03-02T15:40:37","slug":"ppi-sql","status":"publish","type":"post","link":"https:\/\/sada.services\/?p=14274","title":{"rendered":"PPI: SQL"},"content":{"rendered":"\n<ul class=\"wp-block-list\">\n<li>obtener los c\u00f3digos presupuestarios por plan Operativo<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>select mp.id_meta_poa, codigo_presupuestario from ppi.meta_poa_presupuesto mpp\nINNER JOIN meta_poa mp ON mp.id_meta_poa = mpp.meta_poa\nINNER JOIN PPI.objetivo_poa op ON op.id_objetivo_poa=mp.objetivo_poa\nWHERE op.plan_operativo=409;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Eliminar los C\u00f3digos Presupuestarios de un Plan Operativo<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>delete from meta_poa_presupuesto where meta_poa in(\n13144,\n13152,\n13153,\n13160,\n13161);<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Modificar columna de tabla y migrar datos NUMBER(19,4) a NUMBER(19,2)<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER TABLE \"PPI\".\"APORTE_ESTRATEGICO\" RENAME COLUMN CUANTIFICACION TO CUANTIFICACION_OLD;ALTER TABLE \"PPI\".\"APORTE_ESTRATEGICO\" ADD CUANTIFICACION NUMBER(19,2);UPDATE \"PPI\".\"APORTE_ESTRATEGICO\" SET CUANTIFICACION = CUANTIFICACION_OLD;ALTER TABLE \"PPI\".\"APORTE_ESTRATEGICO\" DROP COLUMN CUANTIFICACION_OLD;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[443],"tags":[480,444,479],"class_list":["post-14274","post","type-post","status-publish","format-standard","hentry","category-sigesa","tag-select","tag-sigesa","tag-sql"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/posts\/14274","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sada.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14274"}],"version-history":[{"count":2,"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/posts\/14274\/revisions"}],"predecessor-version":[{"id":14276,"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/posts\/14274\/revisions\/14276"}],"wp:attachment":[{"href":"https:\/\/sada.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14274"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sada.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14274"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sada.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}