Search Engine: Elastic

Article ID: 122534, created on Jul 31, 2014, last review on Jul 31, 2014

  • Applies to:
  • Odin Business Automation Standard 4.5


I need to create a report that lists all orders created in before April 1, but paid from Apr 1. How can I find these orders in database?



The following query will show all the orders that were created in March but closed by invoice in April:

select or.ar_doc_id as order_id, or.doc_date as order_date, inv.ar_doc_id as invoice_id, inv.doc_date as invoice_date, inv.doc_status as invoice_status from ar_doc or, ar_doc inv, ar_adjust ar_adjust where ar_adjust.adjusted_ar_doc_id=or.ar_doc_id and inv.ar_doc_id=ar_adjust.adjusting_ar_doc_id and or.doc_date < '2014-04-01 00:00:00' and inv.doc_date >= '2014-04-01 00:00:00' and or.doc_type = 'OR' order by order_date;

400e18f6ede9f8be5575a475d2d6b0a6 caea8340e2d186a540518d08602aa065 624ca542e40215e6f1d39170d8e7ec75 70a5401e8b9354cd1d64d0346f2c4a3e

Email subscription for changes to this article
Save as PDF