Hi peeps,
Does someone know how to select a variable of a select into?
here's my sample :
select count(*) into Nb_Facture_Echues
from BT_PNS_POS PNS
where PNS.CODE_CLIENT = var_codeClient
and (TO_DATE(sysdate, 'dd-mm-yy') - TO_DATE(PNS.DATE_ECHEANCE, 'dd-mm-yy') < 0);
IF Nb_Facture_Echues <> 0 THEN
select SUM(PNS.MONTANT) into Facture_echues
from BT_PNS_POS PNS
where PNS.CODE_CLIENT = var_codeClient
and (TO_DATE(sysdate, 'dd-mm-yy') - TO_DATE(PNS.DATE_ECHEANCE, 'dd-mm-yy') < 0);
ELSE
Facture_echues := 0;
END IF;
select Facture_echues from dual;
Why this doesn't work?
Does anybody got an issue for this probleme?
Thanks
Does someone know how to select a variable of a select into?
here's my sample :
select count(*) into Nb_Facture_Echues
from BT_PNS_POS PNS
where PNS.CODE_CLIENT = var_codeClient
and (TO_DATE(sysdate, 'dd-mm-yy') - TO_DATE(PNS.DATE_ECHEANCE, 'dd-mm-yy') < 0);
IF Nb_Facture_Echues <> 0 THEN
select SUM(PNS.MONTANT) into Facture_echues
from BT_PNS_POS PNS
where PNS.CODE_CLIENT = var_codeClient
and (TO_DATE(sysdate, 'dd-mm-yy') - TO_DATE(PNS.DATE_ECHEANCE, 'dd-mm-yy') < 0);
ELSE
Facture_echues := 0;
END IF;
select Facture_echues from dual;
Why this doesn't work?
Does anybody got an issue for this probleme?
Thanks