Category Archives: RDBMS

INSTR function in Teradata

Teradata has multiple functions to work with strings. INSTR function is a very handy one when it comes to search a string inside another. In the other blog, we saw how this is done using the INDEX function. In this, we will see the usage of the INSTR function. Unlike the INDEX function, the INSTR… Read More »

INDEX function in Teradata

Teradata has a variety of inbuilt functions to work with Strings. The INDEX function is one of the most commonly used functions in Teradata. It helps to identify the position of a character or string in the values. The INDEX function accepts two arguments. The first one is the string expression and the second one… Read More »

Concatenation of strings in Teradata

The concatenation function is one of the very useful functions used in any language with a variety of use cases. For example, if you want to concatenate the first name and last name of a person and display it as a full name in the output, this function will help you. Teradata has two options… Read More »

Substring function in Teradata

Be it a programming language or the querying language, the substring function is one of the most commonly used ones. The need of extracting the particular portion in a string is much needed while working with the data especially when the contents are of the same length. This will help a programmer to extract a… Read More »

Teradata Get Current date and Time

In Teradata, while writing queries, it is always a good practice to make sure the query is capable of creating Point In Time(PIT) dataset. This is to make sure that the usage of DATE in the code is not hard-coded to produce the same record set every time. Analysts and Data scientists used to create… Read More »

Teradata get Table DDL easily with the table name

Getting the full DDL of a table in Teradata is the most common requirement in order to look at the table structures. DBAs does this often to see if there is any way to improve the way the index is created. This will come in handy while debugging the performance of queries involving such tables.… Read More »

Creating a table in Teradata using another table

Creating a table in Teradata can be done in multiple ways. In this post, we will see how to create a table from another table without the select statement. The following examples will show how to create a table from another table in Teradata. Creating on the fly with no data This is the case… Read More »

BTEQ – Simple way to export data to file

Basic TEradata Query is a powerful utility in Teradata for various reasons. You can write the data of a table into a file using the BTEQ export utility. You can also use it for executing conditional statements based on certain logic, for executing all kinds of DML statements. In this post, we will see how… Read More »