prasad agarwal wrote:
select * from p123 left outer join (p117 inner join p039 on lglstat117=lglcode039) on fnbr123=fnbr117 and refid123=refid117
and enddate117=0 where cnty123='55' and div123='4' and enddate123=0;
select * from p123 left outer join (p117 inner join p039 on lglstat117=lglcode039) on fnbr123=fnbr117 and refid123=refid117
where cnty123='55' and div123='4' and enddate123=0 and (enddate117=0 or enddate117 is null)
Give names to the columns such that it can be easily understandable prasad !!!