Starting with DbVisualizer 9.2, you can use the SQL Commander->Format SQL->Unformat operations instead of the trick below.

If you need to remove formatting line breaks and indentations in an SQL statement, you can use the Replace dialog with a regular expression:

Select Find/Replace from the right-click menu in the SQL Commander editor,

  1. Enter \s+ in the Find what field,
  2. Enter a single blank in the Replace with field,
  3. Enable Use in the Options area and select Regular Expression,
  4. Click Find and then All when prompted.

You can use other regular expressions to do all kinds of edits. This page shows you more about the kind of regular expression patterns that are supported.