18.1 – New Formatting Option, Right-Align Query Keywords

thatjeffsmith SQL Developer 22 Comments

Due to popular demand, we’ve added this new preference to the formatter. With it turned on: On SELECT B.DEPARTMENT_NAME, A.FIRST_NAME, A.LAST_NAME, A.SALARY FROM DEPARTMENTS B, EMPLOYEES A WHERE A.EMPLOYEE_ID = B.MANAGER_ID AND B.DEPARTMENT_ID (+) = A.DEPARTMENT_ID ORDER BY SALARY DESC, LAST_NAME ASC; Off SELECT B.DEPARTMENT_NAME, A.FIRST_NAME, A.LAST_NAME, A.SALARY FROM DEPARTMENTS B, EMPLOYEES A WHERE A.EMPLOYEE_ID = B.MANAGER_ID AND B.DEPARTMENT_ID (+) …

Coming Soon: A More Forgiving Formatter

thatjeffsmith SQL Developer 11 Comments

For 17.4, the formatter will attempt to format invalid SQL for you. If the parser runs into a problem recognizing your code, it will format it as much as it can. But that’s not all. It will ALSO go to the end of your statement, and traverse the SQL in the other direction and continue formatting as far as it …

SQLcl – Setting Up the Formatter

thatjeffsmith SQL Developer 0 Comments

Just because you’re in a command line interface doesn’t mean you’re stuck with ugly code! Wait, if it’s my code, you’re stuck with ugly code. But if it’s YOUR code, then you’re not stuck with poorly formatted code. You can of course use the FORMAT command to format what’s in a file or in the SQLcl buffer. I don’t like …

SQL Developer version 4.2 Early Adopter 2 Now Available

thatjeffsmith SQL Developer 16 Comments

Tons of bugs fixes based on your feedback, especially with the formatter. A few more changes with the formatter: we added more preferences for more flexibility we let you submit code to ‘shape’ the formatting preferences automatically we exposed the brains of the formatter so you can do pretty much whatever you want An example of the formatter ‘by example’ …

Demo: AutoTrace – Generate Hints and Compare Different Execution Plans & Stats

thatjeffsmith SQL Developer 6 Comments

For some reason I procrastinated setting up my video software on my new work machine. Big mistake. I put together this animated GIF to show some new things in version 4.2: Updated formatter – better support for ANSI joins Opening objects referenced in your execution plans Inserting Hints Not new but underutilized: how to compare plans/AutoTraces One Last Thing… …don’t …

Formatter Improvements in v4.2

thatjeffsmith SQL Developer 45 Comments

The old formatter, the code that’s used to format your code from v1 to version 4.1 was based on some pattern matching code and expressions. It was very limited, and didn’t like a lot of syntax and coding styles common in Oracle code. It also wasn’t very flexible. So we built a new engine. One that takes advantage of our …

TABs in Your Code?

thatjeffsmith SQL Developer 2 Comments

Not to start a religious war, but white space in your code can cause havoc when you’re doing code compares and versioning. Some folks like tabs, others prefer to control how their code looks regardless of the editor’s tab display options. From what I can tell, SQL Developer’s code editors won’t even let you insert a tab into them – …

Case Closed: lower, InitCAP, UPPER, And Stuff

thatjeffsmith SQL Developer 9 Comments

Best practice for code readability dictates that your keywords should always be in: insert your preferred style here __________. Here’s a Twitter poll I’m running if you want to personally weigh in: Do you agree? Best coding practices dictate uppercase identifiers? https://t.co/WhOZvL2Bmv — Jeff Smith ☜ (@thatjeffsmith) March 16, 2016 So even if we can’t all agree on what’s best, …