I have to display hourwise diesel issues on a display board using forms6i as front end. If these is no issues for a particular hour i have to display value zero. But in database there will not be any record for that particular hour. So it has become compulsory for me to use join condition as follows.
Select a.dslhours,nvl(b.qty,0)
from
( select dslhours from dsl_displaytime )a
left outer join
( select substr(dsl_time,1,2)dsltime,sum(nvl(dsl_stk_quantity,0))qty
from dsl_stock_ledger
where fillingdate = :disp_date
and dsl_stk_tran_code = 'd_iss'
group by substr(dsl_time,1,2) )b
on a.dslhours = b.dsltime
order by a.dslhours
Is there any better way to write the query than above one from performance point of view? now how to display these twenty four hour values in forms twenty four display fields? is it compulsory to store the result of above query in another table or can we display those values directly on the form?
Please suggest me in detail as i am new to forms.
I am attaching required form screen shot as attachment for clarification purpose.