define
clause of the match_recognize
clause must be used in the pattern
clause, otherwise, Oracle throws ORA-62503: illegal variable definition as demonstrated in the following simple example: select * from dual match_recognize ( pattern(x) define ptrn as 1=1 );