I have a sql that will retrieve data from columns belong to header and detail tables.
select o.formno, o.notes, l.lineno , l.createddate
from header o , details l
where o.order = l.order(+)
there is a filter window where user can select more conditions from a checkbox which then get appended to the sql.
for instance, a user has the option of retrieving data in which info. from header AND details appear or info. from header table ONLY appear.
Something like this
--this returns data from both tables.
select o.formno, o.notes, l.lineno , l.createddate
from header o , details l
where o.order = l.order(+)
and l.lineno >=0 --the appended condition from checkbox user selected
i don't know how to make it such that only data from header table will be returned- what do i add in the condition - so that even if there are details. do not display them ???
Start Free Trial