0
with curse as (select luna,an,valoare from cursl where moneda='eur')
 SELECT *
 FROM curse MATCH_RECOGNIZE (
 ORDER BY an,luna
 MEASURES strt.an as start_an, strt.luna as start_luna,
 strt.valoare as euro_inc,LAST(scade.valoare) as euro_sf,
 count(*) as nr_luni,
 strt.valoare-LAST(scade.valoare) as dif
 ONE ROW PER MATCH
 PATTERN (strt scade{3,})
 DEFINE
 scade AS scade.valoare < PREV(scade.valoare)
 ) a
 ORDER BY a.start_an,a.start_luna;

when running this I receive : ORA-00933: SQL command not properly ended 00933. 00000 - "SQL command not properly ended"

Aleksej
23.1k6 gold badges39 silver badges41 bronze badges
asked May 24, 2017 at 18:09
2
  • Which Oracle version? Commented May 24, 2017 at 18:14
  • Currently I am using Oracle 11g. Commented May 24, 2017 at 18:17

1 Answer 1

2

According to Oracle-Base:

Oracle 12c has added the MATCH_RECOGNIZE clause

answered May 24, 2017 at 18:18
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.