Hi All,
I have code run on sql very fine
the code is given below
CREATE OR REPLACE VIEW order_tracker2 AS
SELECT
NVL(s.sale_order_no,0) sale_order_no,
NVL(s.party_name,0) party_name,
nvl(s.show,0) show,
NVL(s.curr,0) curr,
NVL(c.vip_cutomer,0) vip_cutomer,
NVL(c.agent_name,0) agent_name,
NVL(s.del_date,'01-oct-70') del_date,
sum(NVL(sd.total_qty,0)) ITEM,
sum(NVL(sd.total_price,0)) VALUE,
NVL(s.TYPE,0) TYPE,
nvl(s.comment1,0) comment1,
NVL(S.PERFORMA_TYPE,0) PERFORMA_TYPE,
NVL(C.CURRENCY,0) CURRENCY,
NVL(CD.country,0) country,
NVL(CD.CITY,0) CITY,
NVL(CD.PIN_CODE,0) PIN_CODE,
NVL(SA.edit_date,sysdate) edit_date,
NVL(max(DM.delivery_status) keep (dense_rank first order by decode(DM.delivery_status,'DELEVERED',0,'SHORT SHIPPED',1,'PART DELIVERY',2)),'UNDELIVERED') "DELIVERY_STATUS"
--max(DM.DELIVERY_NOTE_DATE) keep (dense_rank first order by decode(DM.delivery_status,'DELEVERED',0,'SHORT SHIPPED',1,'PART DELIVERY',2,3)) as DM.delivery__note_date
FROM
sale_order s,sale_order_audit SA,
sale_order_detail sd,
customer_master c,
CUSTOMER_DETAIL CD,
delivery_master DM
WHERE s.id=sd.id AND s.id=sa.id(+) and S.SALE_ORDER_NO = DM.SALE_ORDER_NO(+) AND s.CONDIOTN_APPLY IS NULL AND
s.cust_id=c.cust_id and C.CUST_ID=CD.CUST_ID(+) AND NVL(CD.ADDRESS_TYPE,'DELIVERY ADDRESS') ='DELIVERY ADDRESS'
GROUP BY s.SALE_ORDER_NO,
s.party_name,
s.comment1,
s.del_date,
s.order_date,
c.vip_cutomer,
c.agent_name,
C.CURRENCY,
CD.COUNTRY,
CD.CITY,
CD.PIN_CODE,
S.TYPE,
S.PERFORMA_TYPE,
SA.edit_date,
--DM.DELIVERY_STATUS,
s.show,
s.curr;
But on the basis of this view i create a form and i get the error
ORA-24347: Warning of a NULL column in an aggregate function
Please Guide
Thanks And Regards
Vikas Singhal