0

Create Temporary Table

  • updated 6 days ago

Within the data table feature set, you can now create a temporary table based on dynamic selection from a static resource table. These are often referred to in SQLite as in-memory tables/views and the system cleans them up after the call to the server is finished.

Use

You can choose to query and show data from static resource tables, shared data sources at the package or company level, views, and temporary tables. Temporary tables are helpful when multiple users are accessing data stored in multiple base tables. It is possible to set up query joins and have the temporary table dynamically pull relevant records. 

Steps to Create a Temporary Table

  1. From within the project/data folder click the 'New table' icon.

  2. From the data main panel select Create temporary table from the Mode dropdown menu.
  3. In Source field select the type/source of data table for which you are creating a temporary table. See Data Tables in the Designer for more info about table sources.
  4. In the View name field specify a name for the view.
  5. In the DDL field enter the query required to create the temporary table view. Simple examples might be
    • SELECT * from [SOURCE_TABLE] where user = $(username) -- text-based selection
    • SELECT * from [SOURCE_TABLE] where id in ($(value_list)) -- string-based selection where value_list = "apple", "banana"
    • SELECT * from [SOURCE_TABLE] where age >= $(input_value) -- number-based selection
      • For numeric selections you can use the default value feature and specify $(input_value:0) 
  6. Click add to complete the operation. You can review the SELECT statement but not edit it. If you need to change it, just delete the table and recreate it with the corrected DDL.

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like Follow
  • 7 days agoLast active
  • 7Views
  • 2 Following

Home