Null values for header columns
Hi,
I need help with sql query, if we selecting data from header and line table we can expect the header values are duplicate values, but i need one values in first row, rest of the rows header values should be null. for example
SQL Statement:
-----------------------
select aia.INVOICE_ID, INVOICE_AMOUNT, aida.AMOUNT
from XXDR_AP_INVOICES_ALL aia, XXDR_AP_INV_DISTRIBUTIONS_ALL aida
where vendor_id =234233
and aia.INVOICE_ID = aida.INVOICE_ID
and aia.invoice_id = 67862
Results:
---------------------------
INVOICE_ID INVOICE_AMOUNT AMOUNT
67862 110 100
67862 110 10
-------------------------------------------------------------------
in above query we are getting invoice amount and invoice_id are duplicate, here i need
Expecting result:
-----------------------------------------------------------------------
INVOICE_ID INVOICE_AMOUNT AMOUNT
67862 110 100
NULL NULL 10
-------------------------------------------------------------------
please can you help me out how we can develop the query for all rows.
thanks
reddy