Store Procedure Problem
Posted in 1997
Topics: Jobs, Consulting & Announcements
Hi,
I have a store procedure which returns, with a Foreach, a result set from a
select but It just works fine the first time that you execute it the
following times it returns strange data in a string field. I have tryed
everything but nothing seems to work.
....
foreach
select ndocto_ve, abaf201_razon,femisi_ve, neto_ve,iva_ve,
bruto_ve,numot_ve,catai_glos, tipo_producto, nro_nv,
cant_g, kg , descr, nom_prod
into lndocto_ve ,lcliente ,lfemisi_ve ,lneto_ve ,
liva_ve , lbruto_ve ,lnumot_ve ,
lvendedor , ltipo_producto ,
lnro_nv ,lcant_g, lkg, ldescr ,lnom_prod
from tot_fact_final
where descr matches vmercado and tipo_producto matches vtipo_prodreturn lndocto_ve ,lcliente ,lfemisi_ve ,lneto_ve , liva_ve , lbruto_ve
,lnumot_ve ,
lvendedor , lnro_nv ,lcant_g, lkg ,ldescr
,lnom_prod,ltipo_producto
with resume;
end foreach;
...
Thanks for your help
Felipe