All Forums

Topics related to the Teradata Database, excluding database connectivity (e.g. JDBC) and extensibility (e.g. UDFs) . Typical topics are about SQL syntax and usage (SELECT, GROUP BY etc), database performance, use of database functions, comparison with / migration from Oracle or DB2, and generally why the Teradata Database rocks. For articles, blogs and more, see the Database section of the site.

You must login to post to the forums.
partition by a superset of multiple columns Topic by tranlm 25 Jul 2016

Hi guys,

66 views
0 replies
Data migration between 2 different Boxes Topic by Navic 23 Jul 2016 # teradata #datamovent

Hello!
Our team is working in migrating data of few databases from one server to another server which are in different locations. Possibality of data movement  through only physical data dump due to some org policies.  
we have Teradata 14
We like to understand is there any way to take DB backup and move to new server and restore DB?

121 views
2 replies, 3 years ago
DBQL Metrics Topic by samurai07 22 Jun 2013 totaliocount, MaxAmpIO, CPUSkew, IOSkew

Hi ,
Can some please explain / eloborate the DBQL Metrics and how they are interrelated like the below with some example with any record count
TotalIOCount,
MaxAmpIO,
MaxAmpCPU,
ImpactCPU
ImpactIO,
CPUSKew,
IOSkew,
IOSkewWastage,
CPUSkewWastage
 
Thanks

3390 views
8 replies, 3 years ago
How to calculate minimum & maximum values based on a column only if the records are continuous Topic by venkata_k01 14 Jul 2016

Hi,
I have data as below
col1 col2 begindate enddate
A  100  '2016-01-01' '2016-02-18'
A   100 '2016-03-01' '2016-04-07'
A   101 '2016-03-31' '2016-04-20'
A   100 '2016-05-01' '2016-06-03'
A 100 '2016-06-18' '2016-07-07'
 
i need output like 
A 100 '2016-01-01' '2016-04-07'
A 101 '2016-03-31' '2016-04-20'

763 views
11 replies, 3 years ago
Consequential inserts into large fact table performing very slow inside stored Procedure Topic by Soumyatg 21 Jul 2016
 Run_Id Check_Point Check_Point_Desc Records_Processed time_elapsed
16 201,607,122,102 1 Delete From    Xyz 110,013,266   0:00:28.0000
15 201,607,122,102 2 INSERT INTO    Xyz FROM abc6 42,007,343   0:06:27.0000
14 201,607,122,102 3 INSERT INTO    Xyz FROM abc5 66,254,366   0:21:33.0000
13 201,607,122,102 4 INSERT INTO    Xyz FROM abc4 1,276,919   0:01:11.0000
133 views
4 replies, 3 years ago
Defaulting during Teradata table loading through fast load Topic by pradip_rang 21 Jul 2016

Hello everyone,
I am new to database and table loading, I am trying to load pipe separated .txt file into teradata table and i am using fast load mechanism.
My requirement is that for few columns I have write defaultung logic so that if null value found in the file then i need to use the default value may be -1 or so...

101 views
2 replies, 3 years ago
Create a table with a date column that has a default Topic by boxerdog 11 Sep 2012

Hi all,

No amount of google searching or manual reading has led me to the solution to this problem:

I would like to create a table that has a column that is a date.  I want said column to have a default value.

 

26781 views
4 replies, 3 years ago
103 views
2 replies, 3 years ago
Real/DoublePrecision/FLoat type in Teradata Topic by indra91 21 Jul 2016

In the reference of Teradata I could see numeric data types like Real,Double Precision,Float.But I could see example of only Float data.Can anybody point out whether all the three refers to the same type.In case the answer is in negative could you cite an example of a Real/Double Precision type?

168 views
3 replies, 3 years ago
Volatile Tables in Macros Topic by N_Raghu 18 Oct 2014 #Volatile tables

I am writing a long macro that needed to stage data in several tables before loading into final table.

1737 views
6 replies, 3 years ago
Equivalent function for DATEADD Topic by Monica_a 18 Sep 2013 #sql

Hi all,
       I need to calculate 8 weeks of data is there any function related to this??
 

8254 views
5 replies, 3 years ago
free text columns Topic by Madhum 21 Jul 2016

Hi All,
 
We are getting requirements to add a list of free text  columns from ODS to a table in Teradata 
Potentially that will result in 5-6 columns of type varhcar(2000) or varchar(4000).
They may or may not be populated all the time.
This is a fact table.

94 views
0 replies
Data Dictionary Topic by AMIT@TD 18 Jul 2016

Hello Guys
i am new to td. i want to know about DD.
Q1:- can we increase data Dictionary size ?
Q2:- if we can not increase then what is a ratio of data Dictionary space to total teradata space?
Q3:-if we can increase size then how?

185 views
4 replies, 3 years ago
Function quantile throws a numeric overflow error in a large table Topic by zhenwuyang 18 Jul 2016 # teradata # quantile # numeric overflow

I have a large table and it holds about 33 billion records. I need to run simple quantile function but it failed with a numeric overflow error.
SELECT acct_id, QUANTILE (10, ACCT_ID) AS decile  FROM MY_TABLE 

145 views
3 replies, 3 years ago
Convert the data in the Table into XML format Topic by kathir_chaser 18 Jul 2016

HI All,
I'm trying to convert the data in a table to XML format for an application. And the output I get is <Error>.
Also , when i try to run the below statement i am gettting the same:
SELECT XMLELEMENT(NAME "Item", XMLATTRIBUTES('001' AS ID));.
Looks like I am missing something. Can someone helpme out in resolving the same. 

112 views
2 replies, 3 years ago
Using Volatile table in stored procedure Topic by jhangilp 27 Oct 2015 #STOREDPROCEDURE, #VolatileTable

Hi I am trying to use volatile table inside of a stored procedure (for stored returned select statement and looping through it), but I am running into the issue of  Missing/Invalid SQL statement'E(3807):Object 'Temp_Table' does not exist.'.
From this http://stackoverflow.com/questions/24185966/store-the-result-of-a-select-statement-within-a-stored-procedure

743 views
3 replies, 3 years ago
SQL Performance issue Topic by nimish_123 19 Jul 2016

Hi All,
I need your input for performance improvement of below SQL (with EXPLAIN PLAN).
This SQL was running fine previously but suddenly having performance issue. We have refreshed the STATS but still problem persist.
 
explain SELECT
     y.PlntIdCd,
     y.PlngCtryCd,
     y.DivCd,
     y.AtOncePromoFutsCd,
     y.ProdtCd,

84 views
0 replies
CHARACTER SET LATIN versus CHARACTER SET UNICODE Topic by mcfabrero 19 Jul 2016 Character Set to Latin, Character Set to Unicode, datatypes, latin, unicode

Hi All,
I would like to ask for your help on explaining and elaborating the difference between columns having data types set to LATIN and those set to UNICODE.

749 views
0 replies
Difference between event code and crash code Topic by Pratee 10 Jul 2016

For one snapshot , I received event code as 3610 and crash code as 3650.
Most of the time it happenes event code is different than crash code.
Can anyone tell what is actual different between event code and crash code?
 

120 views
2 replies, 3 years ago
Calculate column value based on previous computed value Topic by WAQ 10 Jul 2016

Hi,
I have a requirement to make a derived column called TOTAL which is calculated by subtracting FRU from VEG column (based on grouping of org and dest) and then for every next row calculate the value by subtracting the last value of TOTAL with the current row VEG value and so on. So the result would be something like this:

Before any calculation

289 views
5 replies, 3 years ago
Assigning a value of 1 only to the lowest value for an address type for each customerID in a table Topic by kudentov 17 Jul 2016

Hi, I have a table with many customerIDs and each customerID can have many records each with a different address type. The address types are assigned values as follows: 1 = Home address, 2 = Postal address, 3 = work address, 4 = alternative home address.

105 views
2 replies, 3 years ago
How to CREATE TABLE(copy) without any index and parititions present on source table Topic by venkata_k01 15 Jul 2016

Hi,
I am working on one automation process and in the middle of the process  i need to create a temporary table with same column structure as source table but any index or partitions declared on the source table should not be present on temporary table.
I tried with the below statement
CREATE TABLE db.temptable as db.sourcetable with no data and stats;

606 views
11 replies, 3 years ago
WITH RECURSIVE issue Topic by nambir 18 Jul 2016

Hi ,
 
I want to find the all dependent jobs on one job. SO table2 had full dependncy data of what is dependant on what.
Is there any way I can use WITH RECURSIVE and find the complete depth of one job.
 
this is the query i am using again and again to find dependant jobs

85 views
0 replies
Text Manipulation-Identify a 6 Character String and Replace with Ideal text Topic by tapsips1 16 Jul 2016

Hi
 
I have description column in a table that is pulling in a 6 character integer (like 123456) from somewhere. I would like to identify the 6 character string and replace it with the ideal text/number.
 
Complication: the 6 digit integer is not stable and it could any random combination (say 654321 or 124253 etc.,)
 

107 views
1 reply, 3 years ago
Median function - Fails on view when trying to cast as decimal Topic by teradatatester 14 Jul 2016 cast, median, function, decimal

I have a database table which has four columns and two of the columns are INT. The two INT columns' rows are sometimes empty.
When I try to cast them as DECIMAL(18,3) and then use the Median function I am getting the Error: An unknown character string translation was requested.
 

299 views
4 replies, 3 years ago

Pages