Welcome to Oracle Communities
Register and Participate in Oracle's online communities. Learn from thousands of experts, get answers to your questions and share knowledge with peers.
Working in R12 Version 12.1.3
working in alert
please see below query
i have two dates and count number of records for a particular customer and divide by two dates to get average.
the below query is working fine in toad but same when i apply in alert manager it is showing error inconsistent data types
please i need help
,to_number(sum((to_date(app.apply_date,'DD-MM-YYYY' )) - TO_NUMBER(TO_DATE(ct.trx_date,'DD-MM-YYYY')))) apply_days
from ar_receivable_applications_all app
where app.display = 'Y'
and app.cash_receipt_id = cr.cash_receipt_id
and app.applied_payment_schedule_id = ps_inv.payment_schedule_id
and cust.cust_account_id(+) = ps_inv.customer_id
and cust.party_id = party.party_id(+)
and ct.customer_trx_id(+) = ps_inv.customer_trx_id
and cust.cust_account_id = ct.bill_to_customer_id
and trunc (app.apply_date) <= :pdate and trunc (app.apply_date) >= :pdate-90 -- for last 3 months
and cust_account_id = 10001