i HAVE A QUERY
select nvl(sum(recovered_shp_liters_qty), 0)recovered_shp_qty
where blood_center_key = 2
AND RECOVERED_SHP_LITERS_QTY <> 0
and process_date between :p_start_date and :coll_date;
I am doing a graph. For the above period I am getting the graph. Now I need to compare the graph for the data for 2012. No matter what date range they enter I have to go back to 2012.
I can hardcode p_start_date to be '01-jan-2012'
but coll_date is the one I get from the table to do year to date graph. My question is based on what the coll_date is can we get that to go back to 2012 ?
Can I use a decode or case statement to go back to 2012 of coll_date?
and coll_date has to be