I have two tables named TBL_PAYMENT_TRN & TBL_PROFIT_PETROLEUM_TRN. I want to select all the records from the table TBL_PROFIT_PETROLEUM_TRN & the matching records from TBL_PAYMENT_TRN.
In Figure 1 ,TBL_PAYMENT_TRN is dere.
In Figure 2,TBL_PROFIT_PETROLEUM_TRN is dere.
In Figure 3, See my Select Query Result
In TBL_PAYMENT_TRN one entry is made against ACCOUNT_ID of TBL_PROFIT_PETROLEUM_TRN. So above query selects dat.Code:select TBL_PAYMENT_TRN.UTR_DD_NO,TBL_PROFIT_PETROLEUM_TRN.ACCOUNT_ID from TBL_PROFIT_PETROLEUM_TRN,TBL_PAYMENT_TRN where TBL_PROFIT_PETROLEUM_TRN.ACCOUNT_ID= TBL_PAYMENT_TRN.TRANSACTION_ID AND TBL_PAYMENT_TRN.TYPE_OF_PAYMENT_ID=3
In TBL_PROFIT_PETROLEUM_TRN another entry is dere for ACCOUNT_ID - 378. I also wnat to select dat record & if there is no corresponding record in TBL_PAYMENT_TRN against dat ACCOUNT_ID,I want the null to come.
How to do that!Help me out.
I want the query in Oracle Plz Reply.
I want the output to be like
Code:UTR_DD_NO ACCOUNT_ID utr1 379 null 378




Reply With Quote