2.10 - Select - Teradata QueryGrid

Teradata® QueryGrid™ Installation and User Guide

prodname
Teradata QueryGrid
vrm_release
2.10
created_date
September 2019
category
Administration
Configuration
Installation
User Guide
featnum
B035-5991-099K
The following examples use different SELECT commands on the Teradata system that are supported by the Oracle target connector.

Select

SELECT CAST(Price AS DECIMAL (8,2))
       , mileage
       , CAST(make AS VARCHAR(20))
       , CAST(model AS VARCHAR(20))
FROM cardata@oraclefs_active WHERE make=’Buick’;
       price     mileage  make    model
       --------  -------  ------  --------------------
       17314.10  8221     Buick   Century
       17542.04  9135     Buick   Enclave

Select with Foreign Table

SELECT * FROM FOREIGN TABLE (SELECT make, model FROM default.cardata where make = 'Buick')@oraclefs_active AS dt;
make    model
------  --------------------
Buick   Century
Buick   Enclave

Select with Export Clause

    SELECT * from FOREIGN TABLE(select * from tmpabc )@oraclefs_active EXPORT((select * from oracleTypet) AS tmpabc) as dt;


     *** Query completed. One row found. 11 columns returned.
     *** Total elapsed time was 15 seconds.

     c1                   c2
     -------------------- ---------------------------------------- -------------
     abc                  aaaaxxxxxx

Select with Returns Clause

SELECT * FROM datatypes1@oraclefs_active RETURNS (varchar1 VARCHAR(5) CHARACTER SET LATIN) WHERE bigint1 > 10000 AND double1 < 10000;