Anca Ioana
Anca Ioana

Reputation: 33

MATCH_RECOGNIZE - ORA-00933: SQL command not properly ended

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"

Upvotes: 0

Views: 383

Answers (1)

Aleksej
Aleksej

Reputation: 22969

According to Oracle-Base:

Oracle 12c has added the MATCH_RECOGNIZE clause

Upvotes: 2

Related Questions