Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Joining tables using database views

Join tables into a single view and then create a report based on that view.

Use the Database Views module to create a database view that joins tables to create a pseudo-table that combines data from each table in the view. You can create a report on this data by adding the database view as a table in a report. Accessing the database view does not require database access.

  1. Create a database view
    Create the database view.
  2. Add a table to the database view
    Specify the table to join to the database view.
  3. Example left join in creating a database view
    This example shows the proper settings when using left-joins to add tables to a database view.
  4. Specify a field to return
    Restrict or specify a field that you want returned by the joined table.
  5. Relabel a column
    Sometimes, two different tables may have fields of the same name that are both important (such as two tables with a sys_updated_on field). For clarity, relabel one of the fields.
  6. Configuring the number of records to return
    Specify the number of records to return for a database view when the view is used in a script.
  7. Test the database view
    Verify that the database view works correctly.

Parent Topic:Working with database views for reporting

Related topics

Displaying function results in a database view

Using disjunctions in complex queries

Database views in the base system