Skip to main content
Filter by
Sorted by
Tagged with
Advice
0 votes
3 replies
65 views

I'm working in Teradata SQL Assistant and I need to create a stored procedure that, given a table name, returns the percentage of NULL values for each column in that table. Right now, I generate the ...
danny's user avatar
  • 67
0 votes
2 answers
66 views

I'm trying to create a frequency count table on a derived healthcare table of member age in months when receiving a first medical diagnosis (datediff(month,d.birthdate,d.min_claimdate)). My cleaned up ...
RobertF's user avatar
  • 906
0 votes
1 answer
147 views

For context, I am very new to Teradata SQL and am currently trying to understand how to build out user defined functions (UDF) and procedures (UDP), in SQL form only, though am having some ...
Matthew Cassell's user avatar
0 votes
0 answers
45 views

I am trying to extract data in relation to customer savings on Teradata. So I want to figure out how many months in a row a customer has saved money in 2024 and to display that as a number. I.e if a ...
user28614546's user avatar
0 votes
0 answers
105 views

THIS IS THE CURRENT STATE DATA: THIS IS THE DESIRED FUTURE STATE: Basically, the requirement is that, when the txn_type="dept" and txn_grp="store", from that txndate, within 183 ...
Chug's user avatar
  • 63
0 votes
1 answer
91 views

I am new at my job and we use Teradata. I am using Teradata Studio, and one of our longer Procedures starts with this statement: SELECT ...
Jennifer Thomas's user avatar
0 votes
0 answers
39 views

The table is laid out like this LastName FirstName AccountNumber ServiceCode ActivityCode ActivityDate The activity code is either A for activate and D for deactivate Activity date is a date field of ...
Bao's user avatar
  • 1
0 votes
1 answer
86 views

I am trying to build a console app that retrieves users from LDAP, creates the same users in Teradata, and grants privileges to these users based on their group membership. My app is functioning well, ...
Ahmad786's user avatar
  • 124
0 votes
1 answer
80 views

In the first table, I have client number, start date and other columns: Client number start date other1 other2 xyz 2024-04-01 values10 values20 abc 2024-01-02 values11 values21 ert 2024-01-03 values12 ...
Kings2407's user avatar
0 votes
2 answers
136 views

I have a dataset for certain STS codes and I need to retain the Start and End Date When Status =03 I have the following Data HAVE ID CHGDATE STS 101 11/21/2022 ...
ckp's user avatar
  • 593
-1 votes
1 answer
60 views

Input data: NUMBER FLAG_1 FLAG_2 FLAG_3 FLAG_4 FLAG_5 FLAG_6 123456 X X X X X X Case stmt: SELECT DISTINCT NUMBER, CASE WHEN FLAG_1='X' AND FLAG_2='X' AND FLAG_3='X' THEN 'PRE' WHEN FLAG_4='...
team 9's user avatar
  • 5
0 votes
1 answer
70 views

I have included one 'where' clause which I was hoping to return output with reference to current_date but I am getting an error. Can someone please take a look at it and let me know what exactly I am ...
Virendra's user avatar
0 votes
1 answer
61 views

I have a SQL which gets data until yesterday by using where clause as " Where tpd."RELATIVE_GLOBAL_DAY" = -1 " The db is defined as such that when I want to get todays data, I will ...
Virendra's user avatar
0 votes
0 answers
38 views

I am trying out a MultiCaseMatch statement in Teradata where I get the error message "expected something like ';' between the word 'multicasematch' and '(' ". Would anyone be able to help me ...
bluemoon's user avatar
-1 votes
1 answer
55 views

Code1 | Code2 | Code3 ---------------------- 101| 102 | null 101| null | null 102| 104 | null The above is the table called DiagCodes Select * From Where Where condition should check all the ...
Maddy's user avatar
  • 7
0 votes
0 answers
62 views

I want to update a column named 'FLAG' and set its value as C when the records from two different tables have a match on a few conditions. Please see the below sample of what I'm trying to achieve in ...
Saurav Gupta's user avatar
0 votes
1 answer
274 views

I am using Teradata Parallel Transport to select and insert data from tables in a SQL Server to identical tables in a Teradata database. I have done this before successfully but this is the first time ...
DirtyDataDoneDirtCheap's user avatar
0 votes
0 answers
41 views

I want to build a teradata query that will analyse the DOB field of a table and use case statement to update accordingly. It will keep the month and year fields as it is and change the date as per ...
Niladri's user avatar
  • 29
0 votes
0 answers
502 views

I am trying to insert data from table A to another table B having 900+ columns, but this is failing with this error: Failure 6706 The string contains an untranslatable character. I found out ...
Debasis's user avatar
  • 21
0 votes
1 answer
705 views

Is there a more efficient way to write this case when statement so as to not have so many "when c.clm_its.host.cd IN...". I was thinking it could be possible to add a nested case when within ...
JoeX's user avatar
  • 37
-1 votes
1 answer
51 views

I have a huge volume of a history of transactions table with acc_nbr, tran_nbr, tran_amt, tran_dt, and tran_dis tran_prd I need to find the first date for each acc_nbr and tran_prd Find the First ...
GMS's user avatar
  • 1
0 votes
1 answer
390 views

I try to divide to decimal columns But keeps returns zeros if after casting to decimal For example A B 677.00 900.00 A/B Returns 0.000 I try to divide to decimal columns But keeps returns ...
GMS's user avatar
  • 1
1 vote
1 answer
64 views

I am trying to fetch data for one asset for reporting purposes which is dependent on multiple processes and start time should be the earliest job that starts among them and end time should be latest ...
Debasis's user avatar
  • 21
0 votes
1 answer
198 views

I'm dealing with a dateTime such as '1800-01-01 00:00:00' and I want to convert it to a string = 'N/A', but keep everything else as a dateTime. I tried converting it to a string (To_char(date_time)) ...
Carl Almasan's user avatar
0 votes
2 answers
330 views

just want to know if there is a way that I can generate a list of dates for a certain date range (e.g.2023-01-01 to 2023-01-20) with timestamp at an hourly interval in Teradata using SQL Results that ...
user17178722's user avatar

1
2 3 4 5
11