DWHPro Insights

SQL Tuning

Why Teradata’s LIKE operator behaves differently for CHAR and VARCHAR columns Popular

Illustration of a glossy orange database cylinder with data fragments across its surface

Have you observed the different behavior of the Teradata LIKE operator when applied to a CHAR or VARCHAR data type column? Consider the following table as an illustration: Creating a table: To illustrate, we will add a single row. We will run the SQL statement for the column with the VARCHAR data type. Next, we …

Read more

Advanced GROUPING Methods in Teradata SQL: GROUP BY GROUPING SETS, ROLLUP, and CUBE Popular

Illustration of a glossy orange database cylinder with data fragments across its surface

Teradata SQL and Advanced GROUPING Functions The advanced GROUPING functions will be demonstrated through the following example. The foundation of this demonstration is a table consisting of the flight count for each aircraft and date: CREATE MULTISET TABLE Flights ( PLANE BIGINT NOT NULL, FLIGHTDATE DATE NOT NULL, NR_FLIGHTS INTEGER NOT NULL ) PRIMARY INDEX …

Read more

Learn Teradata Indexing Techniques in this 2-Hour Video Course

Illustration of a glossy orange database cylinder with data fragments across its surface

This course focuses on Teradata indexing techniques. In this two-hour video, you will learn about Teradata’s architecture and Full Table Scans, different types of Primary Index Access such as UPI and NUPI, diverse Secondary Index Access including USI and NUSI, and Join Indexes. This historical video introduction covers indexing topics. The embedded video itself was …

Read more

Benefits of Organizing Stored Procedures into Chapters and Steps

Illustration of a glossy orange database cylinder with data fragments across its surface

I made organizing Stored Procedures into Chapters and Steps a principle. These separation points are marked by comments and variables used in performance and result logging. A step refers to a technical or conceptual task that cannot be further divided without losing the abstraction of Stored Procedures or the main task. Examples of a step …

Read more

Teradata Built-In Functions: TO_NUMBER, TRUNC, CEILING, FLOOR, LEAST, GREATEST, ROUND Widely read

Illustration of a glossy orange database cylinder with data fragments across its surface

Use TO_NUMBER to parse numeric text, TRUNC to discard decimal digits, and ROUND to round them. FLOOR and CEILING move toward negative and positive infinity respectively. Those differences matter for negative values. A letter-case comparison is not a numeric validator. Lab check: 24 October 2026 · Teradata 20.00.28.81 · BTEQ 20.00.00.11 · BTET. The values …

Read more

An Introduction to Teradata Recursions: Generating Date Ranges Without a Physical Table

Illustration of a glossy orange database cylinder with data fragments across its surface

 Introduction to Teradata Recursions To link records from a primary table with a specific date range from a secondary table, a common requirement is to create a simulated history table with snapshot dates using a change history table with defined timelines. Consider the following illustration: The proposed solution would resemble this: If the system calendar …

Read more

Protected by Security by CleanTalk and CleanTalk Anti-Spam