Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

"Non supported SQL92 token at position" error when running Explain Plan (F10) for a query using matc

GregVNov 27 2019 — edited Dec 1 2019

Hello,

I'm trying to display the explain plan for the following query :

With input_data(id, status, event_date) as

(select 1, 1, to_date('01/11/2019', 'dd/mm/yyyy') from dual union all

select 1, 1, to_date('02/11/2019', 'dd/mm/yyyy') from dual union all

select 1, 1, to_date('03/11/2019', 'dd/mm/yyyy') from dual union all

select 1, 2, to_date('04/11/2019', 'dd/mm/yyyy') from dual union all

select 1, 1, to_date('05/11/2019', 'dd/mm/yyyy') from dual union all

select 2, 1, to_date('01/11/2019', 'dd/mm/yyyy') from dual union all

select 2, 1, to_date('02/11/2019', 'dd/mm/yyyy') from dual union all

select 2, 1, to_date('03/11/2019', 'dd/mm/yyyy') from dual union all

select 2, 1, to_date('04/11/2019', 'dd/mm/yyyy') from dual union all

select 2, 2, to_date('05/11/2019', 'dd/mm/yyyy') from dual union all

select 2, 2, to_date('06/11/2019', 'dd/mm/yyyy') from dual

)

SELECT *

FROM input_data

MATCH_RECOGNIZE

(

PARTITION BY id

ORDER BY event_date

MEASURES status_1.status as st1

ONE ROW PER MATCH

PATTERN (status_1{4,} l*$)

DEFINE status_1 AS status = 1

);

But this results in the following error:

pastedImage_0.png

Running the query with F9 works fine. I understand it has something to do with the brackets { and }. I thought I would point this out for future correction?

My SQL Developer version is 19.2.1.247 and my DB version is 12.2.0.1.0

Thanks

Comments
Post Details
Added on Nov 27 2019
7 comments
14,892 views