Category Archives: Teradata

IF ELSE in Teradata BTEQ

BTEQ utility is one of the advantages of Teradata over other extraction utilities. The advantage of BTEQ utility is its error handling ability and conditional execution. It is more common that the query execution is often compared against the conditional flow in programming languages and programmers may end up choosing JDBC connection to have control… Read More »

Error handling with ACTIVITYCOUNT and ERRORCODE in BTEQ

Batch Teradata Query(BTEQ) is a powerful utility in Teradata with multiple options. You can export/import tables and files and make use of them in the same sessions for checking conditions to take decisions. Based on the checks, you can perform your DDL, DML operations. In this post, we will use a very simple use case… Read More »

CREATE TABLE using SELECT in Teradata

In the other post, we saw how to create tables in Teradata and the corresponding examples for each. Here we will see how to create a table with select from another table. Let us see the basic syntax of the same. Create table without data and index Syntax In the above example, please note the… Read More »

CREATE TABLE in Teradata with examples

There are different ways to create tables in Teradata. We can also define the tables in such a way that it will allow or not allow the duplicates. We can also create tables with data from another table on the fly. Create table – Default We can create a table in Teradata with the default… Read More »

Export Teradata table to CSV using Java

In this post, we will see how we can connect to Teradata using the JDBC connection in Java using the credentials and copy the contents of the table to a CSV file. JDBC stands for Java Database Connector which is nothing but a set of libraries that will have supported functions to communicate with Teradata… Read More »

BTEQ export table to file in Teradata

BTEQ stands for Batch Teradata Query. It is one of the utilities of Teradata to execute SQLs. There are two modes to run the BTEQ export utility. Interactive and Batch mode. The most common mode is the Batch mode where the given SQL can be executed by calling the utility in a shell script. BTEQ… Read More »