50 - 100 of 319 tags for teradata


Hi all,

If you are user DBC or user TDWM and you log onto a Teradata Database, you might get treated somewhat differently than other users.  This posting describes what user DBC and user TDWM do, some of the special things about them, and when you can expect them to get treated differently.   We’ll also look at any implications in setting up workload management for these two special users.

I have a query with a UNION.  I was trying to combine 2 records into 1.  The top half gets records from 1 set of tables and the bottom half gets records from a differen set of tables.  Both halves use fields from 2 derived queries.  The results currently look like this:

I am a newbie in Teradata. I need to check a date column has valid date in case statement. This column is in "YYYY-MM-DD" format. If this field is invalid need to use '1900-01-01' as default. Can anyone please guide me on this?

Hi all,
there is a requirement of copying all the tables with data from one db (may be dev) to another db ( Test) .
It can be done as below :
a) Utilizing the metadata tables for creating the automated  create table statements  as below :

Hi all,
I've got an interesting issue going on with Teradata. Suppose I have a table tbl with columns col1, col2, col3 with col1 being the primary key.
I can run 

Select * from tbl where col2 like '%abc%'

However, if I attempt to run the following:

My data looks something like this:
ID | Line | Code
1 | 1 | a
1 | 2 | b
2 | 1 | d
2 | 2 | e
2 | 3 | f
Code | Name
a | alpha
b | beta
d | delta
e | epsilon
f | phi
A common join brings the following results:
ID | Line | Name

Hi ,

I am using a Stored procedure in teradata , in which multiple updates are written. I want to generate log file for Stored Procedure. so that i can come to know how many rows are getting updated by each update statement.

is there any why to implement this. 

Hi All,
       I have faced a scenario recently where the DELETE statements are going into RESPONDING state. I am aware that the sessions which run SELECT will be going into the RESPONDING state if the result is being written into a file. 
I have tried to find the root cause. But couldnt find. Please help me out with this.

I'm attempting to connect MS Accses to a Teradata table with the intention of viewing an object in a BLOB field I have stored there. 
I'm connecting Access to Teradata through a System DSN connction using Teradata driver
My method was to link the table in Access to Teradata through this connection.

I have the following table with columns:
id     fr_dt       to_dt      price
The idea is to find minimum price for overlapping periods and for non-overlapping periods, show the price. The final output should contain non-overlapping periods spanning from minimum of the fr_dt and maximum of to_dt.

Hi all,
Can anyone let me know which all settings are needed to be optimized in DBS Control Settings. Can u list down those which are recommended.? i have gone thorugh in Teradata PDF of Utilities. Need Just the Useful One.
Also PLEASE let me know from where (LOCATION) can i open the DBS Control Settings? I have a Unix Box Environment. 

This “Teradata Basics” posting describes the current dimensions of parallelism in the Teradata Database, and how they work together.

Hi Everyone
Pls help me in solving teradata sql query. I want to know the total YTD active buyers on my website. which includes the buyers for first time (FT)also  the returning buyers(RB). 

i.e. January should have FT (Jan) + RB (Jan)

Feb = FT (Jan) + FT (Feb) + RB (Jan+Feb combined)

Oracle BI Enterprise Edition (OBIEE) 11g Configuration and Integration with Fuzzy Logix DB Lytix™ On Teradata

This article describes how to integrate Oracle BI Enterprise Edition (OBIEE) 11g with Fuzzy Logix DB Lytix™ 1.x on Teradata to enable transparent OBIEE end user access to the advanced analytic functions from Fuzzy Logix.  Fuzzy Logix’s DB Lytix™ 1.x includes libraries of in-database models that run deep inside Teradata Systems.  Use of these models allows execution of analytics within the database, leveraging the performance, parallelism and scalability of Teradata system while dramatically improving the performance of analytic results and simplifying the integration of analytics into existing reporting and analytic applications.

Hello ,

how can i have access Ex:select on view/table from a local database server to a distant database server, with same session ?


I have a table with the following layout

cust_acct_id (PK)| effect_dt | expiry_dt | curr_rec_ind | field_a | field_b | field_c | field_d

I have to populate any NULL values in field_a, field_b, field_c, or field_d with the most recent value received for that field for the same cust_acct_id.

Sample Input:

I am new to TD SQL environment and learning the differences as I code.
I wanted to know if there are any resources available (other than TD DevEx) which explain the differences within TD SQL and MS SQL e.g cannot use variables except in SProc, temp tables vs volatile tables etc ?
Thanks in advance,

Can you give example for User defined functions/methods without external? How methods can be used for UDTs?

I am getting the below message from the log. I could not see that there was a sucessfull connect happened to the DB at all. Usually "UTY6211 A successful connect was made to the RDBMS." would be there. Its missing here and teh steps there after but directly returns error code. Please help on this.

with drvd_amts (acct_nbr, grp_br_ps_org_id, PSAmt)
sum(d.pstd_ttl_amt) as PSAmt

from psfs.ps_gl_acct_ldgr d
where d.fiscal_yr_mth_nbr between 201500 and 201508
and d.acct_nbr between 130500 and 160500

group by d.grp_br_ps_org_id, d.acct_nbr) 


Teradata Studio 15.10 is now available for download. Teradata Studio is an administration tool for creating and administering database objects. It can be run on multiple operating system platforms, such as Windows, Linux, and Mac OSX.

HI, we have a sqoop job that exports data to Teradata hourly. Sometimes job fails with untranslatable character error. We would like to know, if there is any Java Function to check if the string is translatable by teradata. This is of higher priority. Please let us know, if there are any questions.

Hello Experts
I have a requirement to convert oracle date field, that YYYY-MM-DD HH:MM:SS , which is in CET TIME ZONE data.
This data to be  converted  to PST  Timezone in Teradata by considering the Daylight Saving Timings in mind.
Is there any  easier and more effecient way to tackle this issue.

Input :
Key Gap
1 1
1 1
1 4
1 1
Key Gap Overlap
1 1 1
1 1 1
1 4 2
1 1 1

I have on SQL2008 server linked server Teradada. I select from this linked server and for many tables is ok, but
when I select some tables I see error:

In my organisation, there are 6 Nodes used and each node carry 24 AMPs.
Could any one please let me know how to determine how many Number of AMPs are required per node ? 
If More Number of AMPs / Nodes are supposed to increase Performance , Why its not true to have Maximum number of Amps / Nodes ?

Hi Everyone
During the performance analysis in cognos reports accessing Teradata, we have identified a large number of accesses to the Teradata catalog (DBC Tables and lots of Help columns).

Hello All,

I have a query where teradata expain is giving wrong esitmated time though the query is taking very few seconds.
It is estimating 9 mins due to which it is getting throttled.  Issue is in step 7. All the stats are ok and refreshed.
Could anyone pleae suggest what might be wrong.


Hi all,
I am trying to export data hive table to teradata table, Below is the command

hadoop com.teradata.hadoop.tool.TeradataExportTool

-url jdbc:teradata://testsystem/database=testdb

-username testuser

-password testpassword

-jobtype hive

-fileformat textfile

I am tyring to write a query that will give me the customer counts on a rolling 52 week ending on monthly basis. I can't seem to find anything anywhere that will help me. I am trying to avoid pulling the query 12 times to get the 52 week customer counts ending for each month!
this is what I have so far:

In Teradata SQLAssistant, I have created a db user USER1 which has 17 views. This user can do a SELECT on any view, thanks to a profile/role I granted and then associated to him. His child USER2 is a db user with the same profile/role as USER1, but my problem is he can't select any of the views of USER1 :

Friends, I have the following problem: I have a final table, where some values are rounded wrongly. There is no transformation of these values. The tables have the same data type, decimal (9.2) and FastExport it converts to the same data type. An example I got was a value of 46.23.

I have a table with Customer, Quarter, Month and Sales (montly) figures.
I need to calculate Quarter Sales and Previous Quarter Sales per Customer, while also showing Montly sales (see desired table format below).
For quarter sales I use sum() over partition by

I've created a Java Function and imported it in TeraData
But after few thousand executions, the function becomes too slow.
You can find below output from TOP command.
tdatuser  23   8  815m  33m 1976 S  200   1.4          1835:21  udfsectsk

Hi All,


Order by Behavior is different in DB2 and Teradata 


I already tried adding Case specific which doesn’t work for my project related data .


Here is the main query modified (table-name etc for security reasons and its output Demo Data but similar to main one )

I am new BTEQ and scripting. I am checking if my source data is updated or not before i am updating my petspace tables.
where cast(CMPGN_RUN_DATE as date)=current_date-1 and TRANS_DATE =current_date-1
group by 1;
.IF ACTIVITYCOUNT = 0 THEN .EXIT 99; -- 99 error code reserved for dependency

Hello. Unfortunatelly the net is really empty with that information. I didn't find anything right about that. Please, help me with that common problem. I can't connect my Teradata SQL Assistant to ODBC Teradata Source. I'm working alone at my home pc (local host). I've got mysql client and database where i was studying sql first.

I am very concerned with the Disk IOs of my Teradata server.
I have ran the following query

Hi All,
How encryption happens in Teradata? What are the different levels of encryption defined in Teradata? And of course decryption too.

I have set up a BTEQ of an SQL code through PUTTY.
The code runs weekly. However, I run a drop statement and then a create table statement, thus losing the table of the previous week. Is there anyway for me to create a table of the following format so that I retain all the tables that I have created ?

ROW_COUNT is returning wrong number.
i have a table having around 100K rows. In a procedure i'm updating all the rows and returning number of rows affected.
I'm using following query to get number of affected rows.

While exporting data from Teradata table with MLSCRIPT option to generate mload script too. I am getting below strings p1<96> or p1 instead of DATE/TIME/TIMESTAMP fields in layout section.
p1<96>p1<96>.FIELD COLUMN2 * CHAR(1);

I faced this scenario in an interview. Suppose there are 2 large tables say CUSTOMERS AND CUSTOMER_SESSIONS. The CUSTOMERS table holds the CUST_ID and CUST_NAME say for a website such as facebook/amazon. The CUSTOMER_SESSIONS table contains the CUST_ID referencing the CUSTOMERS tables and the SESSION_TIME every time the user logs in.

I am very much new to teradata. I am a mainframe & Iseries developer, recently we came across this teradata for one of our implementataions. I found this forum & its keen intresting for the new bies.Appreciate your way of knowledge exchange.
Can some one let me know the answers for the following on teradata :

I want to write SQL UDF with Multiple Lines:
1. Declare variables.
2. Set those variables with select into statement.
3. some if conditions on Variables
4. return some value.
What is the syntax to write this.
I'm using teradata Version

Can Anyone Suggest me where teradata jobs are available.

I am exploring business calendar functions in teradata. There are some of the business calendar functions like td_week_begin, td_week_end, which takes timestamp with time zone value in first argument and time literal value in third argument, Second argument is the calendar type like iso, teradata.