Running Queries from the ACT Prompt - Aster Client

Teradata Aster® Client Guide

Product
Aster Client
Release Number
7.00
Published
May 2017
Language
English (United States)
Last Update
2018-04-13
dita:mapPath
hki1475000360386.ditamap
dita:ditavalPath
Generic_no_ie_no_tempfilter.ditaval
dita:id
B700-2005
lifecycle
previous
Product Category
Software

To control how ACT handles errors when running single or multi-line SQL queries from the command line, see Using the "on-error-stop" Option in ACT.

To run a single-line SQL query from the command line:

  1. Type the query at the ACT prompt. The query must end with a semicolon.
  2. Press Enter.

For example, to list all the rows of the customer_dim table of the retail_sales database and order the results based on gender, enter this command at the ACT command-line prompt:

retail_sales=> select customer_id, gender, city_id from customer_dim order by gender;

customer_id | gender | city_id
------------+--------+---------
743         | F      |      46
2711        | F      |     124
744         | F      |      66

You can also run commands that return information about the environment, such as:

retail_sales=> show sessionid;

which returns the session identifier for the current session.