Formatter Improvements in v4.2

thatjeffsmith SQL Developer 35 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 – …

30 SQL Developer Tips in 30 Days, Day 10: Compare Stuff Side By Side

thatjeffsmith SQL Developer 2 Comments

We try to make comparing things easy to do. When you’re troubleshooting, you frequently need to know why A isn’t quite like B. So let’s look at a few scenarios. Execution Plans or Autotrace Runs Run a plan or autotrace. Pin it. Run another. Right-click on one, and compare with the other. Voila. Looking at Objects, Side By Side So …

Oracle SQL Developer: Code on Demand

thatjeffsmith SQL Developer 8 Comments

I’ve recently spent a few hours debugging some user defined reports. A post on how to add trace/disconnect context menus to a session report required that I figure out what session my worksheet was running under. The code was easy… SELECT SYS_CONTEXT (’USERENV’, ‘SID’) FROM DUAL; …but I’m lazy. So this: The Setup Open your preferences and go to the …

Trailing or Leading Commas?

thatjeffsmith Database Stuff 16 Comments

For me, it’s leading. If I have a code or syntax problem, I find it easier to see the line missing the comma if I can look at the first char position. Of course you may say that’s crazy, and any reasonable programmer would demand trailing commas. I’m guessing your IDE offers formatting options that allow you to choose what …

Date Night

thatjeffsmith Toad® Stuff (Retired) 1 Comment

For most couples, ‘date night’ is something to look forward to, but unfortunately does not come around often enough. For others, even the word ‘date’ sends a chill down their spine. It’s not an adverse reaction to their partner, but rather a unpleasant reminder to the daily toil that is working with DATE formatted data in their relational database. Wow, …