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.
Partitioning by a character column Topic by cwindland 30 Jul 2009

I want to partition by column that has various single character values e.g. 'y', 'n', etc. My understanding is that it needs to be translated to an INTEGER value through a case statement. Is this correct? If so, does anyone have an example.

8143 views
5 replies, 16 min ago
using COPY from TD13 archive Topic by bocci 6 hours ago TD15 COPY

Hi, 
I have a dump of a TDExpress13 database created via the arcmain utility. I would like to restore it to a TDExpress15 instance on another machine. From my research I see the COPY utility is what i need, but I can't seem to find it on the system or for download. Where can I find this utility, and am I taking the right approach?
 
Thanks in advance

14 views
1 reply, 25 min ago
How to concatenate a date in three different columns? Topic by Wildc 2 hours ago

Hi,
 
I have a dataset where a birth date is splitted in three different columns and i need to put them into one as a date to calculate the age. How do i do this? The format of the columns are SMALLINT, and it looks like this:
Year                Month             Day
1987                 2                     14
2005                  11                  2

37 views
5 replies, 54 min ago
How exactly do I fix an error related to 'untranslatable character' Topic by brim 1 day ago sql

I've found several posts regarding the same topic of an untranslatable character, but don't know how to fix the problem.
 

44 views
2 replies, 55 min ago
Droping a Global Temporary Table Topic by SAP 1 hour ago global temporary table

Hi ,
while dropping a global temporay table , i face the below error .
Executed as Single statement.  Failed [5337 : HY000] Drop Table is not allowed due to materialized temporary tables.
Elapsed time = 00:00:00.031
 
STATEMENT 1: DROP  failed.
How can i drop the table now ? Please help
 

14 views
1 reply, 1 hour ago
Aborting a Stored Procedure Topic by SAP 1 hour ago Aborting a Stored Procedure

Hi ,
A stored procedure was running for a long time . I was unable to abort the stored procedure . So i logged off the session . Will that stored procedure be stopped now ?
Thanks !!!!
 

13 views
1 reply, 1 hour ago
unable to obtain data value because the teradata database indicated that the data type is ambiguous Topic by Jugalkishorebhatt1 8 hours ago unable to obtain data value because the teradata database indicated that the data type is ambiguous

Hello,
1)I created a table with NUMBER(10) datatype.
When i ran sel * from table;
I got the following error:
unable to obtain data value because the teradata database indicated that the data type is ambiguous
2)Whereas when i ran the same table without removing NUMBER(10) along with the column names i got the result.
SEL Col1,Col2 from table

96 views
7 replies, 2 hours ago
Finding PI for a table created already Topic by Sarah_07 3 days ago primary index

Hi All,
I have tables which are already created in DB. Almost half the tables are having more skewness. Now, I need to change PI for those tables which are having high skewness. Instead of checking each and every combination of columns manually, is there any way to check them at a stretch? I have nearly 200 tables.
Any help would be appreciated. Thanks in advance.
 

176 views
9 replies, 3 hours ago
Variables In Custom SQL Block Topic by taruntrehan 5 hours ago Dynamic Variables, variables in sql block, declare variables in sql block

Hi All,
I am working on a application that prepares a dynamic sql blocks for execution.
The application is written in perl which prepares the set of sql statements.
Here is an example :

21 views
0 replies
Stored procedure Topic by Divya Bharathi 1 day ago dynamic sql; parameters; stored procedures;

is it possible to use stored procedure for MODIFY USER by passing the username and password in the procedure call.

59 views
3 replies, 9 hours ago
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

5431 views
3 replies, 15 hours ago
Data redistribution Topic by sinnet 6 days ago

The PI for the table is tran_id.
Can someone please let me know why  the data is being redistributed for volatile table creation when the PI is the same for the volatile table as well.
Please see Explain plans below.
CREATE SET TABLE TRAN_STAT ,NO FALLBACK ,

191 views
6 replies, 21 hours ago
How to find base tables/views for views Topic by SAP 1 day ago How to find base tables/views for views

Hi Team,
I have a list of 300 views . I need to find the base table/views of 300 views . Please suggest me a better way to do it .
Thanks !!!

113 views
7 replies, 1 day ago
To find number of null values in each columns of a table Topic by jayantarout79 1 month ago count null values

Hi ,
I want to count all the null values of all the columns of a table.
SEL ColumnName  from  DBC.Columns where tablename='table_name' and DatabaseName='database_name';
The above will provide all the column names.
SEL COUNT(*)-count(col_name) from table_name;
The above will provide number of null values for one single column.

282 views
7 replies, 1 day ago
VARCHAR or CHAR columns not appearing in answersheet Topic by enigmaderockz 26 Jun 2014 teradata, sql

whenever i run any query in terdadata, i am getting blank result in columns having VARCHAR or CHAR data type. using windows 7.  please help if anyone have idea. not able to understand why CHAR values are not showing in the answersheet result?

239 views
6 replies, 1 day ago
Dynamic value for SAMPLE RANDOMIZED ALLOCATION Topic by Matthew.Villeneuve 1 day ago dynamic, SAMPLE RANDOMIZED ALLOCATION, sample

I'm trying to input a dynamic value for SAMPLE RANDOMIZED ALLOCATION as in the example below. This produces an error: expected something like an integer or a decimal number...
Is there any way to input a dynamic value in this case?

53 views
2 replies, 1 day ago
IDLE sessions IMPACT Topic by tdradha 1 day ago

Hi,
Does anyone have idea about what IDLE session can impact on the System?
One of my Application id loads the data /reads the data and after that most of the sessions are sitting in IDLE state.(Its not holding any locks on any table)Just simply holds the session from TERADATA side, where as the user loginto 3rd part tool.

28 views
1 reply, 1 day ago
DBC.TABLES has truncated view defination in Requesttext field . How can i find full View defination . Topic by Sandeepyadav 2 days ago

Hi,
 
I am try to find the views that don't have lock on tables in it. But when i try to find defination of these view from dbc.tables, view defination is not complete in requesttext field , its getting truncated.
 
Can anybody help . How can i find full defination from dbc.tables.
 
Thanks in Advanc
Sandeep.

308 views
12 replies, 1 day ago
Disable Updates on specific column. Topic by engmalaa 2 days ago update

Dears,
Kindly, I need a solution to disable updates on spesefic column. If there is any solution other than using trigger it will be great.
Thanks
Mohammad Alaa

34 views
1 reply, 2 days ago
Profiles and Account Strings Topic by Kishore_1 2 weeks ago profiles, Account Strings

A profile may be associated with multiple account strings.
What is the query to know the various account strings associated with a particular profile?
 
Thanks in Advance!!

100 views
4 replies, 2 days ago
Accessing Secured Data Topic by Kishore_1 2 days ago Accessing Secured Data

Hi,
There is a secured table in a DB containing highly confidendial customer data.
We provide users access to the database through roles, which are entirely at database level:
Grant select on DBName to Rolename;
Grant Rolename to Username;
All users should be able to access the data except the data in this table.

34 views
0 replies
Why teradata is so difficult to use? Topic by ASagpariya 3 days ago

Hi All,
I'm new to teradata and started learning. I have downloaded Teradata 14 and VMWare workstation. Its been 2 days, i'm struggling to use it. I do not find enough help on how to configure it, and if any issue comes, how to resolve it.
I also downloaded Teradata 13, but then SQL assistant is not available for it, which help me to erite SQLs.

148 views
5 replies, 2 days ago
Teradata as object database Topic by wicik 1 week ago object-relational, object

Welcome,
Some database systems does have some object-relational features although they are rather relational databases.
Does Teradata have some?
 
 

91 views
3 replies, 2 days ago
Tuning LIKE Operator Topic by Boopathi15 6 days ago

Hi 
I have a table of 100 GB with 80 columns in it,, it has around 300 million rows. I'm using like operator to fetch the rows (string entered from front end tool). Currently its taking around 10-20 secs to fetch the rows, I need it to bring down to 2-5 secs.
Stats are collected on those columns

140 views
5 replies, 3 days ago
Send mail from a stored procedure Topic by SAP 4 days ago Email from stored procedure

Hi , 
i have an requirement to send mail from a stored procedure when there is an any error faced inside the stored procedure .
Thanks !!!

86 views
3 replies, 3 days ago

Pages