Questions tagged [teradata]

Teradata is a Relational Database Management System (RDBMS), capable of supporting many concurrent users from various client platforms. Teradata is compatible with the ANSI standard and built completely on parallel architecture.

5,210 questions
0votes
0answers
20views

Teradata: Cannot nest aggregate operations

I wanna calculate the average profit per day, but kept getting error from Teradata: Cannot nest aggregate operations. Here are two tables: trnsact | sku | store | amt | stype | saledate | | ...
0votes
0answers
43views

Teradata stored procedure - run delete statements which are stored in another table in a specific order in a store procedure in teradata

I have a table T1 which has columns like C1,C2,C3... C1 contains delete statement C2 contains an order in which delete should be executed - 1,2,3 (if c2 is 1 then that delete should be executed first ...
0votes
0answers
24views

Remove duplicates appearing within a certain time period using Teradata or sql

I have a dataset containing an ID variable, a date, and several agents (see example below). The agents have been tested several times per patient and I want to filter for every ID the first one to ...
-1votes
1answer
36views

SQL Exchange NULL with other row value on condition

I'm pretty new to SQL and I'm looking for a solution to a NULL values problem in a visw_feature_country and join_country columns. Instead of NULL values I would like the cell to take non-null value ...
0votes
0answers
24views

Create SAS dataset using Teradata "With" clause

I am trying to create SAS dataset using Teradata SQL passthrough. Proc sql; connect to teradata(%login); create table Data as select * from connection to teradata ( with table as (...
  • 499
1vote
1answer
35views

Two conditions failure in teradata case - NOT NULL AND NOT 0

Trying to return a column, giving 1, when column1 is NOT NULL and different than 0. So far managed to do this: MAX(CASE WHEN column1 IS NOT NULL THEN CASE WHEN column1 <> 0 THEN 1 ELSE ...
  • 41.4k
0votes
3answers
35views

Any equivalent for DBC.TABLES and DBC.COLUMNS of Teradata in Snowflake?

In Teradata we right now have a query which gives the list of table names and column names for specific databases like: select * from dbc.tables where databasename in ('A','B','C') Is there an ...
0votes
0answers
22views

LDAP Connection String for Teradata in SSRS

I am setting up the Reporting Servers for a SQL server that I am migrating and one of the data sources connects to Teradata. I am able to connect fine using the DB username and password but when I ...
0votes
0answers
20views

Teradata - Which approach is faster for larger tables, update or delete and insert

I have a very large table in Teradata. I have to run a UDF on a column and store the output of the UDF back in to the column. We can do it in two ways do a direct update of that column using the ...
0votes
1answer
24views

Select Attribiute B where Attribiute A is maximal after groupby in SQL [duplicate]

Given the following table: ID Price Date 1 34 a 1 42 b 2 34 a I would like to have one row per ID where the price was maximal ID Price Date 1 42 b 2 34 a Trying to groupby ID and selecting ID,...
0votes
1answer
24views

Teradata - Get current row end date based on following row start date

I am looking to get an end date for the current row based on the following row's start date Example Input ID Date 1 1/19/2022 1 1/25/2022 1 1/26/2022 2 2/1/2022 Output: ID StartDate EndDate 1 1/19/...
0votes
0answers
12views

Sub String before specific text Teradata

How can I find a substring before a specific (case sensative) text? Example of text 'Hello World - How you doing As 2021-03-12' I world like to search for ' As' (space As) and return the text before ...
0votes
0answers
26views

Teradata TRANSLATE_CHK alternative function in bigquery

I am looking bigquery function/option for following Terdata statement. select TRANSLATE_CHK(t.CUSTOMER_NAME USING UNICODE_TO_LATIN) from customer t Thanks, Yash
0votes
0answers
23views

Getting a unique ACN from database

The actual code has to be in inclusion where it produce 1 or O. And constructed in the below format. I need assistance with the left outer join. Again using the same concept in the example select A....
1vote
0answers
14views

Teradata 3848 and small int with COMPRESS

I am learning Teradata and have run into an issue when I UNION two queries. The error I run into is error 3848, "The ORDER BY clause must contain only integer constants". I checked the table ...

153050per page