Changing the screen width in Teradata BTEQ

The default width in Teradata BTEQ setting display maximum of 75 characters in a single line. If we need to display more than 75 characters in a single line, we can set the width of the screen in Teradata BTEQ. … Read more »

Teradata Interview Questions

1. What is Master Index and Cylinder Index? Teradata uses logical address system, unlike other DBMS which are physical address system. This allows Teradata to locate the data easily if the data gets reallocated or de-fragmented. Master Index and Cylinder … Read more »

INSTR in Teradata

INSTR in Teradata is used to get the position of a search string in source string.  Syntax: select instr( source_string, search_string [,position[,occurrence]]) Example: SELECT INSTR(‘choose a chocolate chip cookie’,’ch’,2,2); The above query will return 20, indicating the position of string … Read more »

OTRANSLATE in Teradata

OTRANSLATE in Teradata:  Returns source_string with every occurrence of each character in from_string replaced with the corresponding character in to_string. OTRANSLATE is an embedded services system function. It can be activated by invoking embedded services functions Expressions passed to this … Read more »

Oreplace in Teradata

Oreplace in Teradata is used to replace every occurrence of matching string with the new string in Teradata. Oreplace is mainly used to either to replace of remove portions of a string. Oreplace Syntax: SELECT oreplace(‘source_string’,’string_to_replace’,’new_string’) Oreplace Example: SELECT oreplace(‘TeradataPoint’,’Point’,’Tutorial’); … Read more »

Teradata database space query

As a Teradata Admin or Developer you may want to know the database space utilization in Teradata system. This will provide a clear picture about how the spaces are allocated over the different databases. Following Teradata database space query will … Read more »

Teradata Joins

Joins mean joining more than one table based on the common columns/values from these tables. Joins are helpful to get meaningful data for business queries. Teradata supports different kinds of join as below. Inner Join. Left Outer Join. Right Outer … Read more »

Teradata RANK Function

Teradata RANK function assigns the ranking(1…n) of rows in the result set based on the value of the sort_expression list. The rows with the same value receive the same rank in Teradata. You may also specify the sorting order in … Read more »

Qualify Clause in Teradata

The Qualify clause filters the results of a previously computed ordered analytical function according to user-specified search conditions. The Qualify clause works similarly to the HAVING clause. But the major difference between Qualify and HAVING is that with Qualify the … Read more »