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.
Calculated value(derived column)for next row Topic by TamilTiger 2 hours ago COLUMN PARTITION

col1          col2 col3   col 4   calculatedcolumn
201301      1      ?      ?           ?
201302       1    ?       ?           ?
201303       1   4.5      3        4.5*12+3(col4) so my value is 57
201304       1    ?        2            57*12+2           686  
201305      1      ?       5          686*12+5        8237

14 views
0 replies
Date Quotes Topic by ledaher 12 hours ago date, quotes

Hello, 

I am a new developer in Teradata world and I'm having to take the quotes from a variable to a software returns me.

 

I have that: a12.Calendar_Dt in (DATE '11/26/2013')

 

I can manipulate the start and the end of the variable but not the center.

I wanted converts the variable in: a12.Calendar_Dt in (DATE 26/11/2013)

 

21 views
0 replies
Secondary Index - Access Counts Topic by matterwaves 12 hours ago

Hello,
After fighting a long battle with system DBAs, we got object logging enabled. This was primarily to assess the usage of NUSIs which were indiscriminately created. I estimated the size occupied by NUSI subtables to be 20% of all our perm space.

23 views
0 replies
separate the column value Topic by Chinu_Teradata 13 hours ago

Hi,
Here i my table
Eid​| Ename| Did| Email

 

5|E |40| e@gmail.com

 3|C| 30| c@hotmail.com

 1 |A |10 |a@gmail.com

6|F |40 |e@gmail.com

4 |D |40| d@hotmail.com

2| B |20 |b@yahoo.com

 

 

i want to separate name and domain name from Email column and want to count no. of diffrent mail id.

18 views
0 replies
tranforming a procedure into function Topic by hercules 13 hours ago

I have a procedure in Teradata, which I want to execute at the select statenent.
For that I assume I have to call my procedure into a function and then use query such as

Sel schema.user_func(input) from table1;

Can anyone please help me how to do that. Suppose my procedure name as proc1 with two arguments.

18 views
0 replies
LastAccess Time stamp not getting updated for table Topic by sreenu.rnn 3 weeks ago dbc.tables, lastaccesstimestamp, view

I have come across a strange situation. I have a view which points to a Global temporary table. There is a daily process that runs a macro to insert data into the view and then use it for select query Joins.
 

238 views
4 replies, 15 hours ago
Need help in insert date statement Topic by Nikhil_Teradata 1 day ago date, sql

Hi,
Here is my insert statement.

CREATE  VOLATILE TABLE A (ClickLoad_Dt DATE FORMAT 'yyyy/mm/dd');

INSERT INTO A(ClickLoad_Dt)
SELECT MAX(CAST (click_dt AS DATE FORMAT 'yyyy/mm/dd') ) FROM B;

SELECT * FROM A

I get and empty table even though the answer to below query is 5/25/2015

64 views
2 replies, 15 hours ago
Get the date and time in yyyy-mm-dd 00:00:00 format in TERADATA SQL Topic by GTREDDY 21 hours ago Appreicated you help

Hi All ,
I m new to teradata so i m not able to get the date in YYYY-MM-DD 00:00:00 format in TERADATA.
 
Can some one please help me ...
Thanks in Advancce
 
GTREDDY

71 views
2 replies, 17 hours ago
How to and Where to run BUILD command after all restore jobs are completed? Topic by Ashok Mahanthi 21 hours ago backup

I am getting below warning message after the restore job completion,only if I run BUILD command I can get my data back after restore.Please help me on this.

 04:49:21  *** Warning ARC1244:NO BUILD automatically enabled. Run 

                     BUILD after all restore jobs.

 

Thanks in Advance.

 

Ashok

23 views
1 reply, 21 hours ago
Use of TITLES in RECURSIVE views and AJIs Topic by rbradfo5 1 day ago titles, syntax

Hi All,
I am wondering whether it is possible to assign TITLES to columns created as part of a RECURSIVE VIEW, or when creating AJI's?
The syntax statements don't seem to indicate it ispossible, but there doesn't seem to be a specific statement that I can't.

29 views
0 replies
Error in BETQ Topic by hanlu 1 day ago

Hi all,
I am  a newbie to use teradata. I learn from the book that I could create a test database using BETQ.
However I got error message like that:
 Teradata BTEQ 15.00.00.00 for WIN32. PID: 5884
 Copyright 1984-2014, Teradata Corporation. ALL RIGHTS RESERVED.
 Enter your logon or BTEQ command:
.logon 127.0.0.1/dbc
.logon 127.0.0.1/dbc

34 views
0 replies
Query Performance Topic by Abhishek_RC 3 weeks ago query tuning

Hi,

375 views
5 replies, 1 day ago
ROW_NUMBER() same values Topic by Fazol 19 Nov 2013

Hi All,
regarding to ROW_NUMBER(). If I have same values for part PARTITION and ORDER BY then How does "ROW_NUMBER()" decide which records will have result = 1 and result = 2?
Example of table
1. row ... col1 = abc, col2 = 1
2. row ... col1 = abc, col2 = 1
3. row ... col1 = xyz, col2 = 99
 

1661 views
10 replies, 1 day ago
No More Spool Space Issues Topic by TdPassion 2 days ago

Hi All,

 

I need urgent help in resolving the SPOOL Space Error Issues while Deleting the data from a Table having billions of records.

 

The query is something like this:

 

 DEL FROM TARGET_TBL

WHERE S_COL IN 

( SEL S_COL 

  FROM XYZ_TBL A

  INNER JOIN PQR_TBL B 

ON A.COMM_ID=B.COMM_ID

107 views
1 reply, 1 day ago
Query band in procedure. SET QUERY_BAND ';' UPDATE FOR SESSION;" Topic by KlevtsovStanislav 03 Mar 2014

Example :
I try to add "SET QUERY_BAND = 'TEST = 1.0;' UPDATE FOR SESSION;"
Error: [Teradata Database] [TeraJDBC 13.10.00.01] [Error 5526] [SQLState HY000] SPL1027:E(L45), Missing/Invalid SQL statement'E(5568):SQL statement is not supported within a stored procedure.'.
if used : "SET QUERY_BAND = 'TEST = 1.0;' UPDATE FOR TRANSACTION;"  - it works

1121 views
7 replies, 1 day ago
Column Masking Topic by ranakumar85@gmail.com 1 day ago Masking

Hi,
is there any way to mask the column with different value on teradata, like:
PersonID   PersonaName
1001         Thomas
1002         Jon
1001         Fred
-- output
PersonID   PersonaName   PersonaID_ch   PersonName_ch
1001         Thomas            312345           Taddfas
1002         Thomas            546789           Taddfas

48 views
0 replies
VIEW CREATION QUERY Topic by johnsunnydew 5 days ago

Hi there,
 
I have a question regarding view. I have created 2 views as follows.
 

 

479 views
4 replies, 1 day ago
how to find version of a teradata database? Topic by liju 04 Apr 2006

hi,how do i find version of a teradata database from the client?

19861 views
2 replies, 1 day ago
Teradata valid date check without udf Topic by ravimans 3 days ago dnoeth;Raja_KT;fred;feinholz;Fred;Adeel Chaudhry;ulrich;M.Saeed Khurram

Hi All,

308 views
5 replies, 2 days ago
DROP COLUMN Topic by johnsunnydew 5 days ago

Hi ,
Does drop column command delete the entire data from the table or just that column and its corresponding data?
 
Regards
John

329 views
1 reply, 3 days ago
Missing rows after join Topic by nerdgirl 5 days ago Join issue

 

I have Table 1 , Table 2 , Table A as below 

 

Table A

ID_NUM

7643458

9050876

 

Table 1

ID_NUM        ORGN                  Money

7643458      9468976            0.08

7643458      9469313            0.15

 

322 views
3 replies, 4 days ago
TPT SCRIPT Topic by Raji.Thanik 5 days ago

Greetings All,
Thanks a lot for created this useful site. I'm new to terdata and i  really needed your help to understand terdata scripts. Here my doubt, i needs insert the records and then delete old records from the table .
Condition :  job should be abort when my insert is failed (control, should not go to delete statement when my insert fails)

86 views
0 replies
Convert a column into a comma separated list Topic by philos188 1 week ago

I have a table that looks like this:
Column_A               Column_B
55555                     123
55555                     124
55555                     125
55555                     126
55555                     127
77777                     130
77777                     131
77777                     132

478 views
5 replies, 6 days ago
What's going on with the median function in Teradata? Topic by dylanzwick 1 week ago median, blue, bold, function

If I type median in a Teradata query, the word becomes blue, but it does not become bold and blue.
So, I suspect what's going on is that median is not, in fact, a function in Teradata, but the word is reserved and cannot, for example, be assigned to a user written function. Is this correct?

475 views
4 replies, 6 days ago
Stored procedure that creates a GTT Topic by HMarella 6 days ago

Hello,
I have a table name and it is getting created by a stored procedure.  How do I find the name of this stored procedure.  Are there any log tables that captures these details. 
Thanks
HM

285 views
0 replies

Pages