5.4.5 Managing Quick SQL Models and Scripts

Save entered Quick SQL shorthand syntax as model for future use, or save the generated SQL as a SQL script.

5.4.5.1 Saving a Quick SQL Model

Reuse Quick SQL shorthand syntax by saving a model.

To save a model:

  1. On the Quick SQL page, enter Quick SQL shorthand syntax in the left pane and click Generate SQL.
    The generated SQL appears on the Oracle SQL output pane.
  2. Click Save Model.
    The Save Model dialog appears.
  3. In the Save Model dialog:
    1. Model Name - Enter a name.
    2. Description - Enter a description for the model.
    3. Click Save Model.
    The model is saved.

5.4.5.2 Loading a Saved Quick SQL Model

Access Quick SQL models from the Load window.

Developers can view and load their own saved models under My Models or all workspace developer models under Workspace Models.

To load a saved Quick SQL model:

  1. Navigate to the Quick SQL page:
    1. On the Workspace home page, click the SQL Workshop icon.
    2. Click Utilities.
    3. Click Quick SQL.
  2. Click the Load button on the left Quick SQL Shorthand pane.
  3. To load a saved model:
    1. Under either My Models or Workspace Models, choose a model.
    2. Click Load Model.
    The selected model appears.
  4. To edit the model name or description, or delete a saved model:
    1. Load the saved model as described in the previous step.
    2. Click model name.
      The Edit Model dialog appears.
    3. To edit the model name or description, edit the appropriate fields and click Save.
    4. To delete the model, click Delete.

5.4.5.3 Saving a SQL Script

Save generated SQL as a script.

To save a SQL script:

  1. On the Quick SQL page, enter Quick SQL shorthand syntax in the left pane and click Generate SQL.
    The generated SQL appears on the Oracle SQL output pane.
  2. Click Save SQL Script.
    The Save Script dialog appears.
  3. In the Save Script dialog:
    1. Script Name - Enter a name.
    2. Click Save Script.
      • Script Name - Enter a name.

      • Click Save Script.

    The script is saved in SQL Scripts.

See Also:

Using SQL Scripts

5.4.5.4 Downloading SQL Scripts

Download a generated SQL script locally.

To download.generated SQL script:

  1. On the Quick SQL page, enter Quick SQL shorthand syntax in the left pane and click Generate SQL.
  2. Scroll through generated SQL in the SQL Output pane.

    The generated SQL appears on the Oracle SQL Output pane.

    At the bottom, the line starting with -- Generated by Quick SQL is the SQL shorthand syntax. If you specified any settings they display after the line starting with # settings = . The following is the Quick SQL syntax and Settings in the previous example:

    -- Generated by Quick SQL Wednesday May 01, 2019  10:04:45
    
    /*
    departments /insert 4
       name /nn
       location
       country
       employees /insert 14
          name /nn vc50
          email /lower
          cost center num
          date hired
          job vc255
    
    view emp_v departments employees
    
    # settings = { PK: "IDENTITY", semantics: "CHAR", language: "EN", APEX: true }
    */
  3. Click Download to save both the Quick SQL shorthand and the generated SQL locally.