
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://w.cidesa.com.ve/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="es">
		<id>http://w.cidesa.com.ve/index.php?action=history&amp;feed=atom&amp;title=Crear_Escalera_Presupuestaria_en_wiki</id>
		<title>Crear Escalera Presupuestaria en wiki - Historial de revisiones</title>
		<link rel="self" type="application/atom+xml" href="http://w.cidesa.com.ve/index.php?action=history&amp;feed=atom&amp;title=Crear_Escalera_Presupuestaria_en_wiki"/>
		<link rel="alternate" type="text/html" href="http://w.cidesa.com.ve/index.php?title=Crear_Escalera_Presupuestaria_en_wiki&amp;action=history"/>
		<updated>2026-07-21T10:21:15Z</updated>
		<subtitle>Historial de revisiones para esta página en el wiki</subtitle>
		<generator>MediaWiki 1.16.2</generator>

	<entry>
		<id>http://w.cidesa.com.ve/index.php?title=Crear_Escalera_Presupuestaria_en_wiki&amp;diff=1408&amp;oldid=prev</id>
		<title>Jlobaton en 21:42 10 ene 2008</title>
		<link rel="alternate" type="text/html" href="http://w.cidesa.com.ve/index.php?title=Crear_Escalera_Presupuestaria_en_wiki&amp;diff=1408&amp;oldid=prev"/>
				<updated>2008-01-10T21:42:34Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Revisión anterior&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revisión de 21:42 10 ene 2008&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línea 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línea 10:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;  cadena VARCHAR;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;  cadena VARCHAR;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;  cadena1 VARCHAR;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;  cadena1 VARCHAR;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;  --p varchar;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;  R varchar;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;  R varchar;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;  i INTEGER;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;  i INTEGER;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línea 25:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línea 24:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LOOP&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LOOP&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cadena := trim(cuentas_new.codpre);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cadena := trim(cuentas_new.codpre);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --p := LENGTH(cadena);&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;/*&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FOR i in reverse 1..p LOOP&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;/*&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FOR i in reverse 1..p LOOP&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF (SUBSTR(cadena,i,1)='-') THEN&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF (SUBSTR(cadena,i,1)='-') THEN&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línea 71:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línea 69:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Este Codigo hay que Mejorarla...&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;--[[Usuario:Jlobaton|Jlobaton]] 17:42 10 ene 2008 (VET)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jlobaton</name></author>	</entry>

	<entry>
		<id>http://w.cidesa.com.ve/index.php?title=Crear_Escalera_Presupuestaria_en_wiki&amp;diff=1407&amp;oldid=prev</id>
		<title>Jlobaton: New page: &lt;pre&gt; CREATE OR REPLACE FUNCTION &quot;SIMA004&quot;.&quot;creare_scalera&quot; () RETURNS integer AS $body$ /* Permite Crear la escalera Presupuestaria */  DECLARE        cuentas_new RECORD;        cadena VA...</title>
		<link rel="alternate" type="text/html" href="http://w.cidesa.com.ve/index.php?title=Crear_Escalera_Presupuestaria_en_wiki&amp;diff=1407&amp;oldid=prev"/>
				<updated>2008-01-10T21:41:45Z</updated>
		
		<summary type="html">&lt;p&gt;New page: &amp;lt;pre&amp;gt; CREATE OR REPLACE FUNCTION &amp;quot;SIMA004&amp;quot;.&amp;quot;creare_scalera&amp;quot; () RETURNS integer AS $body$ &lt;span class=&quot;autocomment&quot;&gt;- Permite Crear la escalera Presupuestaria: &lt;/span&gt;  DECLARE        cuentas_new RECORD;        cadena VA...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nueva&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE OR REPLACE FUNCTION &amp;quot;SIMA004&amp;quot;.&amp;quot;creare_scalera&amp;quot; () RETURNS integer AS&lt;br /&gt;
$body$&lt;br /&gt;
/*&lt;br /&gt;
Permite Crear la escalera Presupuestaria&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
DECLARE&lt;br /&gt;
       cuentas_new RECORD;&lt;br /&gt;
       cadena VARCHAR;&lt;br /&gt;
       cadena1 VARCHAR;&lt;br /&gt;
       --p varchar;&lt;br /&gt;
       R varchar;&lt;br /&gt;
       i INTEGER;&lt;br /&gt;
       CUANTOS INTEGER;&lt;br /&gt;
       INI INTEGER;&lt;br /&gt;
       FIN INTEGER;&lt;br /&gt;
       cuentas cursor is select * from cpdeftit order by codpre DESC;&lt;br /&gt;
&lt;br /&gt;
DECLARE&lt;br /&gt;
BEGIN&lt;br /&gt;
     OPEN cuentas;&lt;br /&gt;
     FETCH cuentas into cuentas_new;&lt;br /&gt;
     IF FOUND THEN&lt;br /&gt;
        LOOP&lt;br /&gt;
            cadena := trim(cuentas_new.codpre);&lt;br /&gt;
            --p := LENGTH(cadena);&lt;br /&gt;
/*            FOR i in reverse 1..p LOOP&lt;br /&gt;
                IF (SUBSTR(cadena,i,1)='-') THEN&lt;br /&gt;
       	  		   cadena := SUBSTR(cadena,1,i-1);&lt;br /&gt;
       	  			--SRW.MESSAGE(100,CADENA);&lt;br /&gt;
                    SELECT COUNT(*) AS CUANTOS FROM &amp;quot;SIMA004&amp;quot;.cpdeftit WHERE trim(codpre)=cadena;&lt;br /&gt;
         	  		IF (CUANTOS=0) THEN  -- NO LO ENCONTRO ENTONCES INSERTO&lt;br /&gt;
      	  			   --SRW.MESSAGE(100,'AQUI INSERTO '||CADENA);&lt;br /&gt;
       	  	           INSERT INTO &amp;quot;SIMA004&amp;quot;.cpdeftit SELECT RPAD(cadena,32,' '),codpre, nompre, codcta, stacod, coduni, codtip, estatus FROM CONTABB WHERE CODCTA=cadena;&lt;br /&gt;
                       COMMIT;&lt;br /&gt;
                    ELSE	&lt;br /&gt;
       	  			     --SRW.MESSAGE(100,'COMO CONSEGUI EL NIVEL ENTONCES NO BUSCO MAS');&lt;br /&gt;
                         EXIT;&lt;br /&gt;
         	  		END IF;&lt;br /&gt;
       	  		--SRW.MESSAGE(100,'AQUI BUSCO, SI NO CONSIGO INSERTO, DE LO CONTRARIO NO DEBERIA SEGUIR');      	       			&lt;br /&gt;
       	  		END IF;&lt;br /&gt;
  */     	  		&lt;br /&gt;
         cadena1 := trim(cuentas_new.codpre);&lt;br /&gt;
         INI := 1;&lt;br /&gt;
         FIN := INSTR(cadena1,'-',INI,1);&lt;br /&gt;
         WHILE FIN &amp;lt;&amp;gt; 0 LOOP&lt;br /&gt;
&lt;br /&gt;
	          cadena := SUBSTR(cadena1,1,FIN-1);&lt;br /&gt;
                    SELECT INTO CUANTOS COUNT(codpre) FROM cpdeftit WHERE trim(codpre)=cadena;&lt;br /&gt;
         	  		IF (CUANTOS=0) THEN  -- NO LO ENCONTRO ENTONCES INSERTO&lt;br /&gt;
       	  	           INSERT INTO cpdeftit SELECT RPAD(cadena,32,' '), nompre, codcta, stacod, coduni, codtip, estatus FROM cpdeftit WHERE trim(codpre)=cadena1;&lt;br /&gt;
                    ELSE	&lt;br /&gt;
                         --EXIT;&lt;br /&gt;
         	  		END IF;&lt;br /&gt;
            INI := FIN+1;&lt;br /&gt;
            FIN := INSTR(cadena1,'-',INI,1);&lt;br /&gt;
		    END LOOP;&lt;br /&gt;
&lt;br /&gt;
          FETCH cuentas into cuentas_new;&lt;br /&gt;
          IF NOT FOUND THEN&lt;br /&gt;
             EXIT;&lt;br /&gt;
          END IF;		&lt;br /&gt;
           END LOOP;		&lt;br /&gt;
	END IF;&lt;br /&gt;
&lt;br /&gt;
	CLOSE cuentas;&lt;br /&gt;
	RETURN(0);&lt;br /&gt;
END;&lt;br /&gt;
$body$&lt;br /&gt;
LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jlobaton</name></author>	</entry>

	</feed>