Tags for case
Sum distinct records in a table with duplicates
I have a table that has some duplicates. I can count the distinct records to get the Total Volume. When I try to Sum when the CompTia Code is B92 and run distinct is still counts the dupes.  Here is the query:
sum case distinct
Aggregate details into summary - case statement
Dears, We need to summarize the below detail data as expected; but somewhere we are missing something and not getting the proper aggregate. Pls help.   Detailed data:   ID          GSM     LL      Loyalty Points aaa        ?          ?       100 bbb        200      ?       200
aggregate summary detail case
Hi There, i need help to write an sql script to return values from different positions within the example string below: #12345678.#98B9876.#123456 i want values from positions 2-8 and concatenate with values in positions 11-13.
substring case concatenate AMADU BARRIE DHS SIERRA LEONE
CASE is a solution?
Hello,   I have a difficult task (or at least this is how I see it) to implement using SQL. Here is the case: - there are two tables: A and E each one having a numeric column. Each of the two tables contain checkpoints(numbers) for a specific region.
case sql join
OReplace vs. Case Statement
Hello - I have a messy dataset that has values like this: 1=Very Dissatisfied, 2, 3...9, Very Satisfied=10. I have used a Case statement in the past to remove the words and '=' sign, but was thinking I could use the OReplace that was part of Teradata 14.
oreplace case
Select Statement inside a case statement
Hello,   I am facing a problem when writing a case statement,  Here is the sample query
case select sql teradata
UPDATE Statement using LEFT JOIN and CASE statement
UPDATE db.source   SET   region= CASE WHEN b.title_rw LIKE '%East%'  THEN 'East' WHEN b.title_rw LIKE '%Central%'  THEN 'Central' WHEN b.title_rw LIKE '%West%'  THEN 'West' else 'Region N/A' END    from db.source a
update join case
RANGE in INTEGER data fields
hi, i've got this table with the field ampcputime, which is a integer and used the following text in a query
Range integer case interval
Solving Business Problems with SQL
The presentation is to acquaint business users with Structured Query Language (SQL) and some interesting techniques to access their data with examples for using CASE; Subqueries and Correlated Subqueries; Types of SQL joins and how they are implemented on Teradata; facts about NULLs; Derived Table usage and other interesting optimizer information.
sql joins dml case Nulls
is it possible to use two qualify in a query based on some condition?
I have a requirement in that i have to use two qualify in the same query based on the value returned(this value is also returned by a qualify statement).   Ex :  Ex1   NAME1 NAME2 AGE RANK A B 1 1 A C
qualify case when