Quantcast
Channel: SCN : Discussion List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 5653

Reserved Words"INTERVAL" in SAP HANA SQL

$
0
0

Hi,

The query counts the number of orders ordered in a given quarter of a given year in which at least one lineitem was received by the customer later than its committed date. And i used 'interval' to get the quarter.But the query can not be executed.How can I fix this problem?

 

 

select

  o_orderpriority,

  count(*) as order_count

from

  orders

where

  o_orderdate >= date '1993-07-01'

  and o_orderdate < date '1993-07-01' + interval '3' month

  and exists (

  select

  *

  from

  lineitem

  where

  l_orderkey = o_orderkey

  and l_commitdate < l_receiptdate

  )

 

 

 

error.PNG

 

Thanks in advance.

Naomy


Viewing all articles
Browse latest Browse all 5653

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>