You are on page 1of 1

SELECT * FROM cf_plan

where length(ccodenfi) > 0

/* SIN INNER JOIN */


select D.ccodcue, P1.cdescue, P1.nanacue, D.ndebe, D.nhaber, D.nhaber nmonto,
D.nhaber nrecla, 0 as nesrecla
from cf_diariol as D,cf_plan as P1 where D.ccodcue = P1.ccodcue and
length(ccodenfi) > 0 and 0 = 1

/* CON INNER JOIN */


select D.ccodcue, P1.cdescue, P1.nanacue, D.ndebe, D.nhaber, D.nhaber nmonto,
D.nhaber nrecla, 0 as nesrecla
from cf_diariol D inner join cf_plan P1 on D.ccodcue = P1.ccodcue where 0 = 1

select D.ccodcue, P1.cdescue, P1.nanacue, D.ndebe, D.nhaber, D.nhaber nmonto,


D.nhaber nrecla, 0 as nesrecla,P1.ccodenfi
from cf_diariol as D,cf_plan as P1 where D.ccodcue = P1.ccodcue and 0 = 1 and
length(ccodenfi) > 0

select D.ccodcue, P1.cdescue, P1.nanacue, D.ndebe, D.nhaber, D.nhaber nmonto,


D.nhaber nrecla, 0 as nesrecla,P1.ccodenfi
from cf_diariol D inner join cf_plan P1 on D.ccodcue = P1.ccodcue where 0 = 1 and
length(ccodenfi) > 0

SELECT D.ccodcue, P1.cdescue, P1.nanacue, D.ndebe, D.nhaber, D.nhaber nmonto,


D.nhaber nrecla, P1.ccodenfi FROM cf_plan as P1, cf_diariol as D
where P1.nanacue = 2 and P1.ccodbal1 = 'P115'and P1.ccodbal2 = 'P120'

SELECT * FROM cf_plan


where cf_plan.nanacue = 2

You might also like