Teradata Functions

Explore frequently used Teradata SQL functions.

Teradata Functions

local_offer teradata local_offer SQL local_offer teradata-functions

visibility 12
thumb_up 0
access_time 14 days ago

In SQL Server, ISNULL function is commonly used to populate a value for null columns.  In Teradata, there is no ISNULL function but COALESCE and CASE WHEN can be used as alternatives.  Use COALESCE function SELECT COALESCE(NULL,'ABC','CDE'); Result: ABC ...

local_offer teradata local_offer SQL local_offer teradata-functions

visibility 7
thumb_up 0
access_time 15 days ago

Teradata RPAD function is used to add repeated characters at the end of a string to increase the string to a specified length. It can be used to add trailing space or zeros to a string. RPAD function signature  RPAD(source_string, length, fill_string) Returns the s...

local_offer teradata local_offer SQL local_offer teradata-functions

visibility 10
thumb_up 0
access_time 15 days ago

Teradata LPAD function is used to add repeated characters at the beginning of a string to increase the string to a specified length. It can be used to add leading space or zeros to a string. LPAD function signature  LPAD(source_string, length, fill_string) Returns the...

local_offer teradata local_offer SQL local_offer teradata-functions

visibility 24
thumb_up 0
access_time 2 months ago

The following code snippets show how to use round numbers to hundreds or thousands in Teradata.  warning Alert - The following code snippets are used to round to the smallest hundreds or thousands that is equal or greater than the i...

local_offer teradata local_offer SQL local_offer teradata-functions

visibility 88
thumb_up 0
access_time 2 months ago

This page shows how to trim or remove leading or/and trailing zeros using Teradata SQL.

local_offer teradata local_offer SQL local_offer teradata-functions

visibility 753
thumb_up 0
access_time 6 months ago

OREPLACE functions in Teradata can be used to replace or remove characters from a string. OREPACE is Teradata's extension to ASNI SQL. The usual REPLACE function is not available. ANSI SQL REPLACE function REPLACE function is commonly implemented in many other SQL databases such as ...

local_offer teradata local_offer SQL local_offer teradata-functions

visibility 192
thumb_up 0
access_time 7 months ago

Extract sub string from a string is a common operation in data analytics. In Teradata, function SUBSTRING (SUBSTR) and REGEXP_SUBSTR are provided to achieve that. SUBSTR is used to extract string from a specified location while REGEXP_SUBSTR is used to extract string using regular expressions. ...

local_offer teradata local_offer SQL local_offer teradata-functions

visibility 225
thumb_up 0
access_time 7 months ago

In SQL Server, TRY_CAST function returns a value cast to a specified data type is the cast is successful or null is the cast is not successful.  In Teradata, the equivalent function is TRYCAST. Code snippets -- return int 1030 SELECT TRYCAST('01030' AS int); -- retur...

local_offer teradata local_offer SQL local_offer teradata-functions

visibility 2584
thumb_up 1
access_time 7 months ago

In ANSI SQL, you can use DATEADD function to easily add or subtract days/week/months/years from a date as the following code snippet shows: SELECT DATEADD ( ...

Read more

Find more tags on tag cloud.

launch Tag cloud