Data set help
Hello all,
I am trying to get the first record (transactions_line_number) of this data set, only if the transaction_numbers are equal and the item_descriptions are not. I can't seem to figure it out today.
select distinct ari.BILL_TO_CUSTOMER,
ari.SALESPERSON_NAME,
arr.TRANSACTION_LINE_NUMBER,
ari.TRANSACTION_NUMBER,
substr(arr.ITEM_DESCRIPTION,1,4),
arp.BALANCE_DUE_IN_FUNCTIONAL_CURR,
arp.DUE_DATE,
ari.INVOICE_TRANS_PROJECT_NUMBER_2,
ari.TRANSACTION_DATE
from arfg_revenues arr,
arfg_ar_payment_schedules arp,
arfg_invoice_ars ari
where arr.customer_trx_id = arp.customer_trx_id
and ari.transaction_id = arp.customer_trx_id
I am trying to get the first record (transactions_line_number) of this data set, only if the transaction_numbers are equal and the item_descriptions are not. I can't seem to figure it out today.
select distinct ari.BILL_TO_CUSTOMER,
ari.SALESPERSON_NAME,
arr.TRANSACTION_LINE_NUMBER,
ari.TRANSACTION_NUMBER,
substr(arr.ITEM_DESCRIPTION,1,4),
arp.BALANCE_DUE_IN_FUNCTIONAL_CURR,
arp.DUE_DATE,
ari.INVOICE_TRANS_PROJECT_NUMBER_2,
ari.TRANSACTION_DATE
from arfg_revenues arr,
arfg_ar_payment_schedules arp,
arfg_invoice_ars ari
where arr.customer_trx_id = arp.customer_trx_id
and ari.transaction_id = arp.customer_trx_id
0