Questions tagged [teradata]
Teradata is a parallel 'shared-nothing' database management system. It is primarily used for data warehouse applications with large data volumes.
76 questions
0 votes
0 answers
19 views
Is it safe to use RTLD_NODELETE to prevent Teradata from unloading UDF shared libraries on failure?
I'm working on a UDF solution for the Teradata Database. My UDFs are written in C and compiled into a .so (shared object) library, which I reference during CREATE FUNCTION. I'm running these UDFs in ...
2 votes
0 answers
48 views
Where sk = null clause gives an error when used in a query but not in a stored procedure in teradata
In teradata sql I get an error when I use sel * from table where sk = null However if I include this in a stored procedure and pass a null value in the parameter I don't. replace procedure(In name ...
0 votes
1 answer
745 views
Similar to how there exists a volatile table in Teradata SQL, how can I create a volatile table or something similar in Azure?
Seen below is the code of how I would create a volatile table when I was coding in Teradata. I liked it because it would be the same structure and format as a normal query, but it would make a ...
-2 votes
2 answers
400 views
Next 90 day review date (Teradata)
Teradata Related question… I have a table containing new starters along with a start date, every 90 days from the start date I need to conduct a review with the starter How do I identify the next 90 ...
0 votes
1 answer
615 views
Teradata: Temporary Table vs Create and Drop Table
Currently I have seen an ETL process where a user created tables that are used to store an intermediate result and then drop the tables at the end of the ETL process. At first glance it seemed to me ...
0 votes
0 answers
251 views
Teradata Large Table Partitioning or Split into multiple parts
We have a large table (4 Terabytes) in Teradata. For compliance reasons, we need to keep 13 months worth of data. However, for querying, we may only need one month worth of data (300GB). I have ...
0 votes
1 answer
3k views
Teradata min and max dates Find the Employees Start Date and Time and End Date and Time for each date
I have columns AssignedTo, InternalID, Task Function, Min(STARTDATE), Max(ENDDATE) AssignedTo InternalID Task Function STARTDATE ENDDATE Joe 67077 Write the letter 08/24/2017 05:30 AM NULL Joe 16354 ...
3 votes
2 answers
429 views
Is the order of columns in a clustered index important?
Does it matters which field I specify first in the index? would CREATE SET TABLE my_table ( validity_date DATE , branch_id SMALLINT , account_class_id BYTEINT , ...
0 votes
1 answer
122 views
Outer Join on all columns if possible, or a subset of columns if not possible, and sum
I have two tables, call them T1 and T2 each with 4 columns A, B, C, Quantity. I want to do an outer join. However, some ABC combinations in T1 do not match with T2, and vice versa. My goal is to join ...
-1 votes
1 answer
1k views
How to measure text similarity (Jaro-Winkler) in Teradata?
In Oracle we can measure text similarity with Jaro-Winkler like the following: SELECT UTL_MATCH.JARO_WINKLER_SIMILARITY('STACKEXCHANGE', 'STAMPEXCHANGE') MYSTRING FROM DUAL; --98 And it turns out ...
1 vote
1 answer
755 views
In Teradata SQL how to get random number between a pair, coming from field/column?
I am recently got stuck upon a simple problem in Teradata: how to get random number between a pair of number coming from field/column? The function RANDOM( lower_bound , upper_bound ) apparently is ...
1 vote
1 answer
2k views
How can I get all CREATE VIEW statements in Teradata?
How to get all CREATE VIEW statements with a single query? This Query is used to get the definition of a single view: show view db.tablename;
0 votes
1 answer
203 views
How do you call an external C function from a SQL stored procedure?
In Teradata 17, I am trying to call their own hash_md5 external function from my own SQL stored procedure: replace procedure p() sql security creator begin declare l_hash varchar(32); set l_hash = ...
1 vote
2 answers
3k views
how to select the not null value of a column when it has both null and not null value in teradata?
consider a table named "TABLE-A" with below data. ID hcc D_CD 1 null 1 1 5 1 2 null 2 2 10 2 2 20 3 3 null 3 I need to select ID,hcc fields from ...
-2 votes
1 answer
1k views
how to select the data in Teradata if it has duplicates in it?
consider TABLE1 and has the below records. ID MBR_ID STRT_DT END_DT ID_TYPE 1 001 01-01-2019 31-12-2019 TYPE_1 2 002 02-05-2019 31-07-2020 TYPE_1 3 002 ...