- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 63 Insurance
- 536.4K On-Premises Infrastructure
- 138.3K Analytics Software
- 38.6K Application Development Software
- 5.8K Cloud Platform
- 109.5K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71.1K Infrastructure Software
- 105.3K Integration
- 41.6K Security Software
Date conversion in CQL
I want to run the following query from TPC-H in Oracle CEP.
SELECT RETURNFLAG,LINESTATUS,SUM(QUANTITY) AS sum_qty,SUM(EXTENDEDPRICE) AS sum_base_price,
SUM(EXTENDEDPRICE*(1-DISCOUNT)) AS sum_disc_price, SUM(EXTENDEDPRICE*(1-DISCOUNT)*(1+TAX)) AS sum_charge,
AVG(QUANTITY) AS avg_qty, AVG(EXTENDEDPRICE) AS avg_price, AVG(DISCOUNT) AS avg_disc, COUNT(*) AS count_order
SHIPDATE <= date '1998-12-01' - interval ':1' day (3)
I got a problem:
How should I rewrite the bold face line to make it executable for CEP engine? In current form it gives me error.
BTW, I have tried SHIPDATE <= '1998-12-01', which can be executed but based on the result it seems the condition doesn't work correctly. I am using csvgen so that I bound to some limited datatypes. Thus, SHIPDATE is string, however the cql doc says the conversion from string to date is done implicitly.