2.09 - Select - Teradata QueryGrid

Teradata® QueryGrid™ 安装和用户指南

prodname
Teradata QueryGrid
vrm_release
2.09
created_date
2019 年 5 月
category
安装
用户指南
管理
配置
featnum
B035-5991-059K-CHS

Select

以下示例在 Oracle 目标连接器支持的 Teradata 系统上使用不同的 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

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

导出子句中的 Select

    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

Returns子句中的 Select

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