Toad World® Forums

Formatter failure with "ENABLE ROW MOVEMENT" clause

On 13.2:

Format with commented clause: --ENABLE ROW MOVEMENT

CREATE MATERIALIZED VIEW my_dummy
(
   dummy
)
TABLESPACE users
--ENABLE ROW MOVEMENT
BUILD IMMEDIATE
REFRESH FORCE
        START WITH TO_DATE ('21-12-2019', 'dd-mm-yyyy')
        NEXT TRUNC (SYSDATE) + 1
AS
   SELECT * FROM DUAL;

After format:

CREATE MATERIALIZED VIEW my_dummy
(
   dummy
)
TABLESPACE users
ENABLE ROW    MOVEMENT
 BUILD     IMMEDIATE
 REFRESH       FORCE
        START      WITH     TO_DATE        ( '21-12-2019'            ,  'dd-mm-yyyy'            )
        NEXT     TRUNC      ( SYSDATE       )  +  1
 AS
   SELECT       *  FROM     DUAL;

Hello,

The formatting breaks in the middle because of a suspected syntax error near ENABLE ROW MOVEMENT.

ENABLE ROW MOVEMENT doesn't look to be a valid snapshot clause (ENABLE QUERY is), so can you please confirm that this is valid Oracle syntax? Which Oracle version?

Thanks,
Andre

Hmm, testing:

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> CREATE MATERIALIZED VIEW my_dummy
2 (
3 dummy
4 )
5 TABLESPACE users
6 ENABLE ROW MOVEMENT
7 BUILD IMMEDIATE
8 REFRESH FORCE
9 START WITH TO_DATE ('21-12-2019', 'dd-mm-yyyy')
10 NEXT TRUNC (SYSDATE) + 1
11 AS
12 SELECT * FROM DUAL;

Materialized view created.

Looks as this is undocumented, or at least badly documented.

Will add it in our parser asap.

Thanks for the catch!
Andre