All Forums

Share best practices, knowledge, successes and issues in Analytics, and discuss Analytical Applications.

You must login to post to the forums.
Merging Multiple Rows Topic by seifhabib83 10 Jul 2012

Hey All - can someone please help me?


i.e I have the following





Chain ID


And my results are


Description         SKU        CHN-ID

Cell Phones        1001       999

Cell Phones        1001       111


How would I get it to return:


2 replies, 7 years ago
Generating consecutive months based on tenure Topic by lxw 12 Jul 2012

I am new to teradata and trying to figure out how to do this efficiently. I have a data for each customer such as

customer_ID    tenure     Endyyyymm

1                      4            201203

2                      8          201201

1 reply, 7 years ago
Fetch TOP rows Topic by prapul430 08 Jul 2012 fetch top rows


Hi All,


I am new to Teradata and I have a requirement to fetch TOP transactions(ROWS) based on a SALES DATETIME provided to the query.

1 reply, 7 years ago
To find record counts for all tables in a particular database Topic by Sandi 07 Oct 2008

Hi,Can someone help me to write a query to pull Record counts for all tables in a particular database or record counts for all tables present in Teradata.Thanks a lot

6 replies, 7 years ago
Extracing ZONE part from a TIMESTAMP(0) WITH TIME ZONE column Topic by karmakar.amitkr 02 Jul 2012

In table definition the below column is mentioned like:

Lcl_Dttmz TIMESTAMP(0) WITH TIME ZONE FORMAT 'yyyy-mm-ddbhh:mi:ss' TITLE 'Sale Location Local Dttmz ' COMPRESS

Value retriving looks for the same is like '2010-08-26 14:42:45+10:00' .Want to cast the value as VARCHAR(25) to extract the zone part.

3 replies, 7 years ago
Need to cast an invalid date to a valid Topic by pema_yozer 17 Apr 2009

Hi All,I have this problem, we are loading come operater entered data in to a teradata table.The column contains different data and based on the condition its loaded.On a few condition the column would contain date which is cast into date format dd/mm/yyyy and loaded.But once in a while we get date for example 1/02/2009 or 01/2/2009.Which gives an invalid date error and we have to manually edit

3 replies, 7 years ago
Deleting records using teradataR Topic by adelvalle 28 Jun 2012 teradatar

Hi everyone. 

I have created a loop that will do the following 

2 replies, 7 years ago
Connecting to Business Objects without ODBC Topic by sid19840 06 Mar 2012

Are there ways to connect Teradata to Business Objects (BO Webi/BO Analyzer) without using an ODBC connection?

1 reply, 7 years ago
Multiple Database connections in a query Topic by woodje 12 Aug 2011 teradata, oracle 11g, toad for analytics


2 replies, 7 years ago
Equivalent of %TYPE and %ROWTYPE in teradata Topic by raj1983 13 Feb 2008

Hello All,In oracle Both %TYPE and %ROWTYPE are used to define variables inPL/SQL as it is defined within the database. If the datatype orprecision of a column changes, the program automically picks upthe new definition from the database without having to make anycode changes.whats equivalent of this in Teradata.

3 replies, 7 years ago
remove "whitespaces" and "." in a string Topic by gmoney 14 May 2012 teradata, sql, remove, trim, characters, spaces, ltrim, rtrim

I have a table with a column of alpha-numeric data the currently has multiple (periods) "." and spaces in the string.

I need to remove them for data compare in another DBMS.

I have searched not only through this forum but others as well and can not seem to find the solution.

Note: orereplace is not an option as it is not installed and have no way to get it installed.

3 replies, 7 years ago
Is there a 'sounds-like' phonetic function ? Topic by TimManns 10 Jul 2006

Hi all,I'm currently working on a data cleaning exercise, consolidating customers who have separate ID's, but are actually duplicates. The data are manually entered and therefore minor variations in company name may occur.I can perform the analysis outside of Teradata, but the estimated time to completion is literally several days.Is there an easy 'sounds-like' phonetic type of function in Teradata (that is supported by Teradata SQL) that could, for example, match "phone-shop" and "fone shop". I'd like to use this type of feature in a join.Maybe a pipe dream...ThanksTim

7 replies, 7 years ago
Date Function Topic by Vimal 21 May 2007

I want select month name and date from a date column. For Ex. My output should be '15-JAN'. Plz help me how to do it in Teradata, coz i am new to it.

5 replies, 7 years ago
Query with FORMAT'$$$,$$9.99' Not displaying $ as expected. Topic by gmoney 26 Apr 2012

I have a query that runs fine except in my results I am not getting a $ in my currency column.

Here is the line I am using:

sum(CHRGE_AMT)(FORMAT'$$$,$$9.99') MRC,

my results are still simply 136.25 not $136.25 as expected.

Any thoughts on what might be preventing it from displaying?

2 replies, 7 years ago
Date gap analysis Topic by Sudhar 14 Nov 2011 date gap analysis

Hi All,

I am trying to find out the records with dates overlapped or continous and then making it as a single record with the minimum date to the max date.

Here is the example of what i am trying to achieve.

Table 1









4 replies, 7 years ago
insert Data Topic by eejimkos 20 Mar 2012


When you insert data in a table (from zero point,with no data ...),it is better to drop it or delete it?Meaning,keeping the stats will help or will slow down the performance of inserting.It is better to drop the indexes and then re-create them?Or,leave them and let them built during inserting?



1 reply, 7 years ago
Need Help for TWM Topic by Prashanta 26 Mar 2012


i am using TWM.and i want to know is anybody knew that how to detect fraud using Teradata warehouse miner and how it can be inplemented in it? or any example anybody have or studycase for it. please share it?

thanks in advance,rgds,Dinesh Agrawal



1 reply, 7 years ago
How to use Fastexport exit codes in UNIX Shell Script Topic by terankit 15 Mar 2012


In my shell script I am using BTEQ, which is doing Fastexport. I will get two return codes. One from BTEQ and another from Fast Export. I want to use the Fast Export Return code in my Unix script to do the further processing.

I found that return codes automatically stores in $? and we can use that. but it is not working.

If RC !=0 then

2 replies, 7 years ago
group data by ranges Topic by CuriaG 01 Sep 2011


I'm new to this but i need to make this:

I have the following values

2 replies, 7 years ago
Connecting remotely through TeradataR with LDAP Authentication Topic by jquinn2 10 Mar 2012


Hi All-


I have a puzzling situation. I've been using the TeradataR package in R to connect to my company's teradata databases for a while now, but I can't seem to figure out why I can't connect remotely. I thought when I originally started using teradataR, I could connect remotely, but I can't any more.

0 replies
Need help with adding an integer column to a date column in teradata Topic by divyarajnarain 08 Mar 2012


I am trying to create a measure in business objects using the formula: (order_date + pflt)


where the order_date is a normal date and the pflt is an integer column in teradata


When I try to add the pflt to the date field, I get the error: Invalid date supplied for dbname.pflt

4 replies, 7 years ago
Combining 4 tables and prioritize the data in them? Topic by terankit 05 Mar 2012

Hi All,


I am new to Teradata world and in trouble. I have a requirement, hope I will get help from you guys. I will try to be as much clear as I can, further clarification will be provided if needed.

8 replies, 7 years ago
I want to extract number from String Topic by RahulG 14 Jul 2008

Suppose I have string likeRD_S0310RD_153RDH_S0906RD_S0083I want output031015309060083How can I do this

2 replies, 7 years ago
Concatenate Rows In A Table Topic by pmhere 21 Mar 2007

Hi,I am looking for a query that can do the following.Input Column1 Column21 A1 B1 C2 D2 E2 F3 G4 H4 IOutputColumn 1 Column21 A,B,C2 D,E,F3 G4 H,IPlease suggest.Thanks Prashant

3 replies, 7 years ago
buy oak wood Topic by alprofcolet 04 Mar 2012

teak wood buy raw wood for sale keighley timber merchants wood pellet boilers for sale wood fence panels for sale where to buy koa wood wood gates for sale purple heart wood for sale where can i buy wood buy rough cut lumber dark oak wood

0 replies