myDBR SQL Editor

Editor Basics

The myDBR SQL Editor is a built-in editor for accessing reports and other database objects in the database. You can use it to create reports, query data, update data, or run any SQL command against the selected database.

When the SQL Editor is started, the following options are displayed:

Where:

Show Query Builder
Allows you to browse database structure, search for objects (routines, definitions)
Show myDBR Commands
Quick access to myDBR commands and command options and to command help
Data Browser
Quick access to myDBR Data Browser
Styles
Quick access to report styles
Report parameters
Link to the parameter screen of the selected report
Show selected object
Select object (table, procedure, function, or myDBR command) from code and click this to see the code/definition of the selected database object. The object will be opened in a new tab
Execute
Execute selected text or if no text is selected, the full code from the editor window. When multiple queries are included in the editor, the editor uses a separator ('$$' in MySQL, 'go' in other databases) to separate multiple commands from each other.
Show results in a new window
By default, the results from executed queries are shown under the editor. If this option is selected the output is shown in a separate window.
Output as SQL
This option formats the output of the query as SQL into a new window. This option allows you to send troubleshoot report to myDBR support without the need to have a table structure and all the data to be sent. The SQL output is enough to replicate a troublesome report.
/* */
Comment selected section of the code
History
Shows saved executed commands and procedures in case you lose on. Will be kept in session and cleared in log out.
Code snippets
Code snippets palette for default and user-defined snippets. If the editor has a selection, the button will create a new snippet based on the selection.
Database processes
Show active database processes. You can kill a runaway process.
Keyboard shortcuts
Show Keyboard shortcuts
Preferences
Set editor theme, indent, keymap, and autocomplete databases.
Tabs: Original, Editing, Query 1
While developing the reports you can have helper code to be executed from a different tab. The Original tab contains the source code as it was before you started editing

The editor can be started from a number of points:

  • For existing reports:
  • Select 'report code' from the main screen.
  • Select Edit report code from the 'Edit Report' screen.
  • Select 'Edit report code' from report Wizard.
  • For new reports:
  • Select 'New report' from the main screen. You will now be asked for the name of the stored procedure to be created.