SUBSTR in Teradata

SUBSTR or SUBSTRING function works same in Teradata. Only the syntax is different. Syntax: SUBSTR ( <column-name>, <start-location> [ , <length> ] ) Example: SELECT SUBSTR(‘TeradataPoint’, 4 , 4), SUBSTR(‘TeradataPoint’, 2 , 6), SUBSTR(‘TeradataPoint’, 8 , 4), SUBSTR(‘TeradataPoint’, 4 , … Read more »

Teradata Subquery

Teradata subquery is basically a SELECT query within a query. The SELECT query called as inner query executed first and the outer query uses the result from the subquery. Below are some of the features of the subquery. A query … Read more »

Concatenation Operator || in Teradata

Concatenation Operation in Teradata joins two strings provided inside the single quote. Concatenation operator works similar to CONCAT function. This operator mainly used in the SELECT statement. Concatenation is the process of combining two or more column into one single … Read more »

Teradata TOP Function

The TOP function is used to produce ‘N’ rows from the table based on specific criteria. Also it produces The TOP N percentage of row from the table. All the identical values if WITH TIES option is used with sorting … Read more »

Teradata Sample Function

The Teradata SAMPLE function returns some specific amount of data from a table or view. It can be used when a smaller or more manageable data is desirable than the entire set of data from the table. Teradata Sample Function … Read more »

Teradata BETWEEN Date

The Between operator in Teradata can be used to filter the result-set for the date type columns as well. The date column can have dates in various formats. Teradata Between DATE syntax The general syntax for Teradata Between date is … Read more »

Teradata DATE Format

Teradata DATE format function converts the default date format as per the user requirements. For ANSI date format, by default Teradata follows DATE format as ‘YYYY-MM-DD’ and for IntegerDate Teradata follows date format as ‘YY/MM/DD’.  The DATE format function can … Read more »

Teradata Date/Time Function

Date and time function one of the most important function in Teradata. So we need to understand the concept very clearly. Keywords related to the Date and Time SELECT DATE AS “DATE” ,CURRENT_DATE AS “ANSI DATE” ,TIME AS “TIME” ,CURRENT_TIME … Read more »

Teradata String Function

Teradata supports several string functions to manipulate the string. UPPER & LOWER Function The UPPER and LOWER functions covert the character column values all in uppercase and lowercase respectively. UPPER and LOWER are ANSI compliant. Syntax UPPER ( expression ) … Read more »

Teradata Aggregate Function

The Aggregate functions prepare the summarization of values from one or more tables. Detail level of information will be lost after performing the aggregate on some specific tables. Teradata support most common Aggregate function as below. Function Name Detail COUNT … Read more »