Académique Documents
Professionnel Documents
Culture Documents
v_arrCoef[i]:=2;
end if;
if i=2 then
v_arrCoef[i]:=1;
end if;
if i=3 then
v_arrCoef[i]:=2;
end if;
if i=4 then
v_arrCoef[i]:=1;
end if;
if i=5 then
v_arrCoef[i]:=2;
end if;
if i=6 then
v_arrCoef[i]:=1;
end if;
if i=7 then
v_arrCoef[i]:=2;
end if;
if i=8 then
v_arrCoef[i]:=1;
end if;
if i=9 then
v_arrCoef[i]:=2;
end if;
end loop;
for i in 1..10 loop
arregloEntero[i]:=1;
if i=1 then
aux1:=substring(p_cedula from 1 for 1);
arregloEntero[i]:=aux1;
RAISE NOTICE 'fila = %',arregloEntero[i];
end if;
if i=2 then
aux2:=substring(p_cedula from 2 for 1);
arregloEntero[i]:=aux2;
RAISE NOTICE 'fila = %',arregloEntero[i];
end if;
if i=3 then
aux3:=substring(p_cedula from 3 for 1);
arregloEntero[i]:=aux3;
RAISE NOTICE 'fila = %',arregloEntero[i];
end if;
if i=4 then
aux4:=substring(p_cedula from 4 for 1);
arregloEntero[i]:=aux4;
RAISE NOTICE 'fila = %',arregloEntero[i];
end if;
if i=5 then
aux5:=substring(p_cedula from 5 for 1);
arregloEntero[i]:=aux5;
RAISE NOTICE 'fila = %',arregloEntero[i];
end if;
if i=6 then
aux6:=substring(p_cedula from 6 for 1);
arregloEntero[i]:=aux6;
RAISE NOTICE 'fila = %',arregloEntero[i];
end if;
if i=7 then
aux7:=substring(p_cedula from 7 for 1);
arregloEntero[i]:=aux7;
RAISE NOTICE 'fila = %',arregloEntero[i];
end if;
if i=8 then
aux8:=substring(p_cedula from 8 for 1);
arregloEntero[i]:=aux8;
RAISE NOTICE 'fila = %',arregloEntero[i];
end if;
if i=9 then
aux9:=substring(p_cedula from 9 for 1);
arregloEntero[i]:=aux9;
RAISE NOTICE 'fila = %',arregloEntero[i];
end if;
if i=10 then
aux10:=substring(p_cedula from 10 for 1);
arregloEntero[i]:=aux10;
RAISE NOTICE 'fila = %',arregloEntero[i];
end if;
end loop;
tamano:=10;
tercerDigito:=cast(substr(p_cedula,3,1) AS integer);
verificador:=cast(substr(p_cedula,10,1) AS integer);
suma:=0;
digito:=0;
band[1]:=tercerDigito;
band[2]:=tamano;
RAISE NOTICE 'terD= %',band[1];