Forum Stats

  • 3,767,981 Users
  • 2,252,736 Discussions


SQLcl apex export split problem

Andrey Dokuchaev
Andrey Dokuchaev Member Posts: 85 Blue Ribbon
edited Oct 28, 2021 12:48PM in SQLcl


If your application page number has more than 5 digit then "-split" option produce not page_NNNNN.sql file, but page_NNNNN_XXX.sql where XXX just some ORDER BY suffix. Therefore, the same page may be sliced to different result files (comparing to previous run).

For example:

1) You have only pages 100001 and 100005. Result: page_10000_001.sql for page 100001, page_10000_002.sql for page 100005 (for example, I don't remeber exact file names);

2) You have added page 100002. Result: page_10000_001.sql for 100001, page_10000_002.sql for page 100002 and page_10000_003.sql for page 100005.

This "feature" ruins possibility of correct APEX-Git (and any other versioning system) binding. Is there a way for "-slice" option to always save APEX page into .sql file with static name (based only on page number)?


  • dbliss-Oracle
    dbliss-Oracle Posts: 27 Employee

    This code was written a very long time ago. It seems that the goal was for page exports to be sorted in numerical order on the file system. It also seems that the original developer did not expect page numbers to be greater than 100,000. The page numbers could be padded with additional zeros, but that would negatively impact those that are currently storing pages in the file system. Not to mention, having additional zeros will make things more difficult to read.

    Because the large page numbers seem to be the exception, I am proposing to keep the page format as is for pages below 100,000 and simply format page numbers without padding for greater than 100,000.

    For example, Page 100005 would be exported as page_100005.sql, Page 234000005 would be exported as page_234000005.sql.

    Let me know if you have concerns or other suggestions.

    Andrey Dokuchaev