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.
cumulative count by date Topic by jj91709 1 day ago partition

I have data such as the following:
Field 1 (unique ID)     Date/time                       
1                               1/1/2016 01:05:09
2                               1/1/2016 01:05:09
3                               2/1/2016 12:00:00
4                               3/1/2016 05:06:06

33 views
3 replies, 2 hours ago
Copying trillions of data to new table Topic by Naina 2 days ago logging, Moving of data

Hello
 
I have recently started working on teradata. I am stuck at a point. I want to move trillions of rows from one table to other. what will be the best way to do this? creating the structure and inserting the data or something like select * into as in sql which is minimally logged. 
Can someone please suggest.

75 views
7 replies, 2 hours ago
TERADATA on Windows 10 Topic by adamharit 1 day ago teradata, windows

Bonsoir ,

je voudrais installer teradata sur mon ordinateur sachant que j'ai windows 10 .

est ce que c'est possible ? si oui , que je-dois faire ? 

Merci de me préciser les étapes à suivre pour l'installer sur ma machine .

Merci Beaucoup

9 views
1 reply, 2 hours ago
Merging 2 rows into one single row Topic by bheeshmachary1 7 hours ago

I have a situation where I need to Insert 2 rows(little info from second row) into single row.

Data looks like this:

Date              Service       CurrMonth   CURR_COUNTS

2016-03-01   Internet      March           10

2016-04-01   Internet      April              10

14 views
1 reply, 3 hours ago
query to find roles and access rights related Topic by syam 26 Feb 2009

Please help me in developing the following queries.1.list of users who are having access rights directly given to them without using RolesAnswer:sel databasename, username,tablename,accessright from dbc.allrights where where accessright not in (sel accessright from dbc.allrolerights);Please correct me,if the query is not correct.2.list of users who are having Power User (All User Role) rights (GRANT/REVOKE etc)3.list of roles which have been Granted/Revoked, who and which to whom.Ans:i think this we will get it from DBC.ROLEMEMBERS table.please confirmThanks for your help

22411 views
6 replies, 12 hours ago
Partition by Range_N Topic by Peeps 2 days ago column partitioniing, #Teradata Partition # partition, character partitioned index, COLUMN PARTITION

Hi all,

I have a question about partition of a table.

 

I have a table with a unique primary index column1 of datatype char(2).

I want to define a RANGE_N - partition on column1 using the hash-function HASHROW as follow:

 

partition by ( RANGE_N((HASHBUCKET(HASHROW(column1 ))) MOD  x  BETWEEN 0  AND (x-1)  EACH 1  ) 

 

33 views
2 replies, 1 day ago
Left join and filter NULL doesnt work! Topic by ylai20 1 day ago

Hi, i have 2 tables
Table 1
colA colB colC
A1 A2 A3
B1 B2 B3
 
Table 2
colA colB colC
A1 C2 C3
D1 D2 D3
 
Table 1 left jon Table 2 on colA
colA colB colC colAA colBB colCC
A1 A2 A3 A1 C2 C3
B1 B2 B3 ? ? ?
 

35 views
3 replies, 1 day ago
Calcultating the mean value of Ys in the score table from multiple score tables for each ObsID Topic by parakram 1 day ago

I have been trying to perform ensemble modelling on logistic regression. I need to take the mean value of various values of Y generated for each regression for each of the unique ObsIDs. For example, if I am taking the average of 5 score tables, this is how I generate a single score table with average values of Y.

17 views
1 reply, 1 day ago
How to force a Teradata user to modify his/her password on next login? Topic by stevehager1970 10 Dec 2010 security, passwords, administration

I see that it is possible to force users to periodically change their password via profiles (DBC.PROFILES.EXPIREPASSWORD) or at the system level (DBC.SYSSECDEFAULTS).

Is there a command that can be issued to force a password change after a user is first created or anytime their password is reset by an administrator?

9090 views
2 replies, 1 day ago
How Can User Change Password? Topic by usmans 28 Aug 2013 Password reset, Password change, Modify Database, DDL Alter

Hi All,
For a user to be able to change a password of his own user or another user, he must have "Drop User" access on that particular user.
Yesterday, however, a user (and I have rechecked this) did not have the required "Drop User" access on his own user but somehow still managed to change his password. Prior to that, all password changing requests were directed to me.

8056 views
3 replies, 1 day ago
to divide the data usinng modulus Topic by nambir 4 days ago

I am trying to use
sel accnt_no from abc 
where cast(accnt_no as bignit) mod 2 = 0
 
i am getting bad character error in this..what could be the possible issue in here?

44 views
2 replies, 2 days ago
Multiple rows into Single row Topic by ASCHARAN 2 days ago dnoeth, Raja_KT, ulrich

Hi Team,
 
I have a requirement like below.
Col1 
ABC
DEF
and if my COL1 has any of ABC or DEF then it should make another entry say 'XYZ' like below.
COL1
ABC
DEF
XYZ.
When i use a case statement like below.

19 views
1 reply, 2 days ago
Want to know the difference between the working of teradata statements Topic by D_SETHI 2 days ago

Hi Team,
 
I am an ETL developer, we are working on project where we need to extract data from Teradata,
The requirement is like I want to calculate the no. of months  between two dates , add 1 to it and then compare.
its like A = (Difference between St_dt and End_dt) +1
what I am using is :
A =(MONTHS_BETWEEN(St_dt, ENd_dt) (FORMAT '9999') (CHAR 8)) +1

39 views
2 replies, 2 days ago
With recursive in a Select Topic by Koentje 11 Mar 2012

How can I use a WITH RECURSIVE as Derived table in a (complex) Select?

Below a small part of the query. The query contains lots of Inner and Left Outer Joins, and 1 of them should be a hierarchie, prepared for the output.

Now I got message 3707, expecting '('

Select *
from T0200_Product T0200

9023 views
12 replies, 2 days ago
Automating release lock after database copy failure Topic by deansiewert 1 week ago Release Lock

We are running into a problem when we restore a backup that causes the job to fail due to join indexes we have.  The root cause has been determined, there's a patch that exists.  But until we can get management to pay to get it installed, we have the situation in which tables need to have "RELEASE LOCK" run. 

39 views
2 replies, 2 days ago
MS Visio 2010 - Reverse Engineering Views? Topic by teradatatester 10 Jun 2013 visio, views

Has anyone successfully Reverse Engineered Teradata Views using MS Visio 2010?
When I try "Reverse Engineering" the Views check box is grayed out and not selectable. Is there a dbc table or view I need additional rights to?
 

1422 views
2 replies, 2 days ago
XMLAGG, XMLELEMENT - XML functions Topic by ASCHARAN 3 days ago @dnoeth@Raja_KT@Adeel Chaudhry

Hi Team,

I have a sql statement like below.
RTRIM(XMLAGG(XMLELEMENT (E, COL1|| ';') ORDER BY COL1).EXTRACT ('//TEXT()'), ';') AS COL_NAME
Can someone tell me the usage of XML functions and what above command does line by line.
 
Thanks,
-- AsCharan

 

9 views
0 replies
Teradata Error: [3704] '' ('0A'X) is not a valid Teradata SQL token. Topic by aolympio 24 Jul 2009

Hi guys!I'm facing this problem(I've programmed it in C#/.NET):Performing this part of code:adaptador.InsertCommand = command;command.UpdatedRowSource = UpdateRowSource.None;adaptador.UpdateBatchSize = 100;command.CommandText = "INSERT INTO TABLE1 (FIELD1, FIELD2, FIELD3) VALUES(?,?,?);";adapter.Update(myDataTable);I've got this error:[Teradata Database] [3704] '' ('0A'X) is not a valid Teradata SQL token. em System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)em System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)em System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)em System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping)em System.Data.Common.DbDataAdapter.Update(DataTable dataTable)na F:\Application\File.cs:linha 100My DataTable(myDataTAble) has 3 columns with same name of the 3 field of the table and it's already populated.What problem could be?Thanks for help,Anderson

11475 views
10 replies, 3 days ago
Primary key and Primary index on a same column Topic by barani_sachin 16 Aug 2013 primary index, primary key

Hi All,
    While creating a table if i specify both the Primary Index and Primary Key on the same column the table cretion fails.

7777 views
4 replies, 3 days ago
TIPS TO CONVERT DECIMAL TO VARCHAR Topic by rubenjdc 1 week ago TD TPT CONVERSION HELP

Hi everyone, i need help with something (Im noob using TD, and sorry my english)
I´m trying to prepare a tpt script to export some data to a delimited file
In the table i have columns in decimal type, tpt needs cast every column what dont be varchar to varchar, there's no problem

92 views
7 replies, 3 days ago
When you give a calculated column the same alias as an existing column, how do you refer to the new value? Topic by wrightjb 1 week ago recursive, cte, re-alias

Normally when you define a column and give it an alias you can reference it in calculating another column:

38 views
2 replies, 4 days ago
DET DEFINE OFF in SQL Developer Topic by amirk 6 days ago sql-developer, ampersand, variable-definition

Hi,
I am using Oracle SQL Developer to connect to Teradata via TeraJDBC 15.10.00.14.
I am trying to run a script that has & in it, and want to turn off variable definition to prevent TD to ask me for variable values. However, I seem not to be able to run the "SET DEFINE OFF" command that was suggested in this TD forum and other similar posts:

64 views
3 replies, 4 days ago
Who dropped the table in teradata? Topic by Narasimharao.458 1 week ago

Hi,
which table do we need to check, who dropped the table in Teradata?
we are facing this issue but unable to find in dbqlogtbl table.
Thanks,
Narasimha

53 views
2 replies, 4 days ago
Macro vs Procedure - SQL SECURITY Topic by sjuolay 1 week ago macro, procedure

Does CREATE MACRO have an equivalent of CREATE PROCEDURE's SQL SECURITY clause? Or should the database of the user executing the macro always always have SELECT/UPDATE access, as needed, to the tables used in the MACRO?

66 views
4 replies, 4 days ago
REPLACE PROCEDURE Failed. 5863: Problem encountered during compilation phase of C code. Topic by tiiiway 4 days ago

Please Help: Unable to compile Stored Procedure

Hello All,

I have the simple SP and I'm unable to compilefrom sql assistant or bteq. I keep getting an error:'5863:

Problem encountered during compilation phase of C code.

I was just recompiling the existing store procedure.

Thank you in advance.

22 views
0 replies

Pages