Category: Teradata SQL

teradata 0

Error – Select with Grant Option required

“An owner referenced by user does not have SELECT WITH GRANT OPTION access to DB_Name.Table_Name.Col_Name “. This is very common error related with privileges granted to objects in Teradata. So first thing you must...

teradata 0

How to write a BTEQ Script in Teradata

In most of the Teradata environment I have seen the preferred medium to call BTEQ is shell script. It means that Teradata developer will write a shell script which will invoke BTEQ utility to...

teradata 2

Teradata combine rows into single value

Few years ago, I shared a post to “Convert Multiple Rows into Single Row” using recursive queries. Though it solves the problem and gives the correct desired result, the solution was not straightforward. Ideally...

teradata 3

ROWS BETWEEN in Analytical Function in Teradata

ROWS BETWEEN is used in Teradata to determine group for calculating aggregation in Analytical Functions. Whenever you use window functions or OLAP functions you specify the rows which shall be considered for calculating measures....

teradata 3

SCD-2 in Teradata

In SCD (Slowly Changing Dimension) type 2, we have to store all the historical information about any Dimension. So unlike SCD-1, we cannot simply overwrite the updated data we are getting from Source. There...