Example: Using the WHERE Clause - Advanced SQL Engine - Teradata Database

DATASET Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
des1556232910526.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1198
lifecycle
previous
Product Category
Teradata Vantageā„¢

Example: Using the WHERE Clause (AVRO)

Using the table Myavrotable09:

/*determine if any sale included a bicycle*/

SELECT 'TRUE'
FROM Myavrotable09
WHERE 'bicycle' = ANY(avroFile.."Item_Name");
> TRUE


/*determine if any sale was for more than $50*/ 

SELECT 'TRUE'
FROM Myavrotable09
WHERE 50 < ANY(avroFile.."Total_Price");
> TRUE

/*determine if ALL sales were for more than $50*/ 

SELECT 'TRUE'
FROM Myavrotable09
WHERE 50 < ALL(avroFile.."Total_Price");
> TRUE

Example: Using the WHERE Clause (CSV)

Using the table MyCSVtable09:
/*determine if any sale included a basketball*/

SELECT 'TRUE'
FROM MyCSVtable09
WHERE 'Basketball' = ANY(csvFile.."ItemName");
> TRUE


/*determine if any sale was for more than $15*/ 

SELECT 'TRUE'
FROM MyCSVtable09
WHERE 15 < ANY(csvFile.."Total_Price");
> TRUE

/*determine if ALL sales were for more than $50*/ 

SELECT 'TRUE'
FROM MyCSVtable09
WHERE 50 < ALL(csvFile.."Total_Price");
*** No rows found