MySQL Forums
Forum List  »  Spanish

consulta en procedimiento diferente resulta
Posted by: Rene Acevedo
Date: January 27, 2018 07:33AM

tengo el siguiente query

select count(*)
into @var1
from tra_planillas pl join (select rd.recdplco,sum(rd.recdvalo) recdvalo
from tra_recibosc rc join tra_recibosd rd
on rc.recccons=rd.recdrcco
join tra_planillas pl
on rd.recdplco=pl.plancons
where rc.reccesta='AC'
and pl.planesta=1
group by recdplco) da
on pl.plancons=da.recdplco
join tra_carterac cc
on pl.planccco=cc.carccons
join tra_conceptos co
on cc.carccoco=co.conccons
join tra_vehiculos ve
on cc.carcveco=ve.vehicons
where planvalo-da.recdvalo!=plansald;

al ejecutarlo normalmente @var1 arroja un valor > 0, pero cuando ejecuto esta sentencia dentro de un procedimiento @var1 siempre toma el valor de cero


Options: ReplyQuote

Written By
consulta en procedimiento diferente resulta
January 27, 2018 07:33AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.