SQL Builder

From nuBuilderForte
Revision as of 22:40, 8 July 2017 by Admin (talk | contribs) (→‎Type)
Jump to navigation Jump to search

The SQL builder only creates SQL SELECT statements.

These records can be used to create Tables used in Reports.

The SQL Builder can also be accessed via the SQL button next to any nuBuilder Forte Textarea Object requiring SQL.

Creating an SELECT Statement

Description

Description of SQL

Field and Relationships

This is a graphical way to create table relationships.

You can add a table by making a selection from Add Table above the graphical area.

Each table can be dragged by clicking on the table name.

Each table added has..

  • A Tablename.
  • A field that will allow you to enter an alias for this table.
  • A list of fields belonging to this table.
  • A checkbox at the left of each field name allowing that field to by chosen.
  • A checkbox at the top left allowing all fields to by chosen at once.


To create a relationship between 2 tables you need to do 2 things.

  1. Click the first field as you hover over it and its name becomes red.
  2. Unclick as you hover over a field on another table when its name becomes green.

This will create an orange line to represent this relation.

When hovering over an orange line you will see its type.

You can change this join type by double click it.

Clauses Subform

Type

There a 4 types of clauses that can be added using the SQL Builder.

  1. WHERE
  2. GROUP BY
  3. ORDER BY
  4. HAVING

Field

This is a scrolling list of available field names.

Clause

Used by WHERE and HAVING. eg. = 1234

Order

Used by GROUP BY and ORDER BY. eg. ASC or DESC