HI guys i am making a matrix report in which the 'DATE BOOKED IN" will be my columns.the problem is that its not getting order by properly. for e.g it should show
JAN-01,FEB -01 ,MAR-01 instead of this it is showing data in the following manner
JAN-01,JAN-02,JAN-03,FEB-01. Please suggest me any workaround.I had even tried by adding an extra date column for order by but it didnt work.
select a.SEGMENT1 "Stock Code",
a.DESCRIPTION "Description",
to_char(b.date_received,'Mon yy') "Date Booked In",
sum(b.transaction_quantity),
nvl(c.item_cost,0) "Item cost"
from mtl_system_items_b a,
MTL_ONHAND_QUANTITIES b,
cst_item_costs c
where a.inventory_item_id=b.inventory_item_id
and a.inventory_item_id=c.inventory_item_id and
a.organization_id=b.organization_id and
a.organization_id=c.organization_id
AND b.date_received<=sysdate-90
and 'S'=:d
group by a.SEGMENT1 ,
a.DESCRIPTION,
to_char(b.date_received,'Mon yy'), nvl(c.item_cost,0)
order by "Date Booked In
JAN-01,FEB -01 ,MAR-01 instead of this it is showing data in the following manner
JAN-01,JAN-02,JAN-03,FEB-01. Please suggest me any workaround.I had even tried by adding an extra date column for order by but it didnt work.
select a.SEGMENT1 "Stock Code",
a.DESCRIPTION "Description",
to_char(b.date_received,'Mon yy') "Date Booked In",
sum(b.transaction_quantity),
nvl(c.item_cost,0) "Item cost"
from mtl_system_items_b a,
MTL_ONHAND_QUANTITIES b,
cst_item_costs c
where a.inventory_item_id=b.inventory_item_id
and a.inventory_item_id=c.inventory_item_id and
a.organization_id=b.organization_id and
a.organization_id=c.organization_id
AND b.date_received<=sysdate-90
and 'S'=:d
group by a.SEGMENT1 ,
a.DESCRIPTION,
to_char(b.date_received,'Mon yy'), nvl(c.item_cost,0)
order by "Date Booked In