1 Reply Latest reply: Nov 2, 2012 4:21 AM by Zere RSS

    SQLFormatter improvement Sugestion and Bug

    Zere
      Hi everybody,

      playing with the SQLFormatter on the latest SQLDeveloper version 3.2.10 came across different problems.

      For instance there is no way to allow the indentation of
      - JOIN keyword (only to add a line break).
      - AND keyword (is not indented correctly if we set the right alignment this because there is no way to specify on witch keyword to apply the alignment other then the MASTER KEYWORD).
      example:

      SELECT col1 ,col2
      FROM table1
      JOIN table2 ON (table1.parent_id = table2.child_id)
      WHERE col3 = 1
      AND col4 = 4
      ;

      I good thing could be to have the possibility to select the keywords on which applying the format option.

      Plus I don't know if it's a bug but the line break "Before Comma" doesn't work properly, try with this code:

      SELECT library.column1, library.column2, library.column3,
      CASE library.column4
      WHEN cheap
      THEN digits(library.column27) concat library.column28
      ELSE 123456
      END AS column4,
      CASE library.column5
      WHEN expensive
      THEN digits(library.column27) concat library.column28
      ELSE 123456
      END AS library.column6,
      CASE column7
      WHEN free
      THEN digits(library.column27) concat library.column28
      ELSE 123456
      END AS column7
      FROM DUAL;


      Thank you in advance