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.
Cursors in stored procedures Topic by mithunk 19 Feb 2013 cursor processing teradata stored procedures

Hi,
 
I have to create a stored procedure which returns resultset. Common answer to this was the usage of cursor inside the stored proc. I have few questions on using cursors inside stored procedure.
My first question would be Is there any other means by which we can return a resultset from a teradata stored procedure ?

12250 views
10 replies, 3 years ago
EXPORTING SELECT QUERY OUTPUT TO A TEXT FILE Topic by khawar.ameer 25 Aug 2016 #Export #Text

HELLO,

CAN ANY TELL ME HOW TO EXPORT RESULT OF FOLLOWING QUERY TO A TEXT FILE

SELECT ACCOUNT_NAME, ACCOUNT_TITLE

FROM DB_BRANCH.ACCOUNTS

WHERE BRANCH_PARTY_ID = '5555'

REGARDS

KAM

145 views
2 replies, 3 years ago
How to grant all required privileges retained by DBC to my new admin user? Topic by franceszhu 25 Aug 2016

I created an administrative user "DBADMIN" from user DBC by following the standard best practice. The admin user will manager all the subsequent users and databases. However, I am not clear about the command to grant all required privileges retained by DBC to my new admin account.
 

317 views
1 reply, 3 years ago
When to use Join Index Topic by agnit.chatterjee1988 23 Aug 2016

Hi ,
What are the indications from the explain plan of a query that might indicate we should use a JI [ aggregate,sparse,single table or multi table ]?
Thanks,
Agnit

140 views
3 replies, 3 years ago
Case statement syntax change? Topic by cqhollon 25 Aug 2016

I recently upgraded to Teradata SQL assistant v15.10 and teh database is version 14.00. All of a sudden I get a syntax error on this statement
the error is  Failed 3706 Syntax error: expected something between the 'when' keyword and the 'year' keyword

239 views
1 reply, 3 years ago
Best way to generate the Sequential numbers : CSUM or IDENTITY columns? Topic by Nishant.Bhardwaj 01 Apr 2013

Hi Experts,
My Requirement is to generate the Sequential numbers in Column ..
As It can be done in two ways :
A) define as identity column 
b) CSUM(1,1) 
 
but i got to know from one of my peer that CSUM has some drawbacks like it locks the table. and Identity column has some constraint of upper limit ..  

36149 views
14 replies, 3 years ago
ALTER TABLE on UNICODE character type issue Topic by anil_athalye 23 Aug 2016

Hi,
I am trying to EXTEND the length of datatype varchar of unicode character set from existing 18 to 40. However, it is giving me an error
3558 Cannot alter the specified attribute(s) for %VSTR.
It displays the same error on an empty table. 
I am using TD 15.00. 
Has anyone faced this issue? Does anyone know the solution on this?
 
Thanks,

140 views
2 replies, 3 years ago
Problems installing in TDExpress15.00.02_Sles11_40GB Topic by juanalfonso 21 Jul 2016 TDExpress15 VM

Hello everybody,

I downloaded the Teradata Express 15.00.02 for VMware Player from the website and I'm trying to install SAP Data Services but I receive the following error:

  • Failed: Minimum patch level requirements for OS (Critical)

This is the release I have:

TDExpress15.00-02_Sles11:~ # cat /etc/SuSE-release

216 views
9 replies, 3 years ago
ODBC TimeStamp Topic by wgfagundes 24 Aug 2016

Hi Guys,
It's my first topic here, I'm new on Teradata and we are facing a problem with ODBC with Timestamp. Let me explain the situation:
We have a Oracle GoldenGate running on IBM AIX replicating transactions to our Teradata 15.00. In our Teradata we have a Table that has a column with TIMESTAMP(6) WITH TIME ZONE NOT NULL.

89 views
0 replies
Locking Topic by prakhar 28 Mar 2009

I have created 1 view..locking base_table for accesscreate view base_table_v assel * from base_table;Their are 2 scenarios1)I am updating through viewWhich lock will be there on VIEW and base table?2)I am renaming base table and somebody is reading it through viewi.e1ST)SEL * FROM BASE_TABLE_V IS RUNNING2ND)RENAME TABLE BASE_TABLE TO BASE_DUP CAME...also1st)RENAME TABLE BASE_TABLE TO BASE_DUP is running2nd)SEL * FROM BASE_TABLE_V cameWhat should happen in above 2 casesAlso please put some light on downgrading of locks and upgrading of locks using locking modifier..I am planning to change VIEW definition as locking base_table for exclusivereplace view base_table_v assel * from base_table;What extra steps i need to take?

21458 views
7 replies, 3 years ago
Insert records in bulk into a Teradata Table Topic by indra91 24 Aug 2016

I have to insert some 50 million rows into a teradata table.The insert data will be generated by shell script.I know we can import data from a file using the IMPORT data option in the sql assisstant.But I would like to know whether this approach will work for 50 million records considering the size of the input file will be huge or we have to implement this using any other utility?Any suggestio

184 views
1 reply, 3 years ago
Resource Monitoring While Running Sql querries Topic by bhushan.koli 19 Aug 2016

How to mointor CPU,Memory,and KB/sec  while running querries in teradata 

136 views
4 replies, 3 years ago
Teradata Implicit Casting Topic by agnit.chatterjee1988 22 Aug 2016

Hi,
I was just curious to know what would happen when 2 columns with different data types integer and byteint is joined together?
According to me the byteint should be converted to integer. However I believe I read somewhere that they are both converted to FLOAT.
Please help.  

136 views
4 replies, 3 years ago
rows unbounded preceding Topic by TdMan 10 Jul 2007

Can anyone tell me what this statement is used for? I found this as a reply to one of the query in this forum.

47711 views
8 replies, 3 years ago
Read Timezone Without ':' Character Topic by sumaps 22 Aug 2016

Hi,
 
I have a source data column that has a timestamp with timezone in the below format:
Mon, 5 Mar 2015 08:23:00 -0800 (PST)
I am trying to cast this as timestamp(0) with timezone FORMAT 'DD-MMM-YYYYBHH:MI:SSBB.S(F)Z'.

107 views
1 reply, 3 years ago
Fetch multiple columns from cursor Topic by jwah 22 Aug 2016 teradata, cursors

Hi,
I am try to use a cursor to loop through multiple values, which is fine if I only use one column.
It doesn't seem to work if I try to fetch more than one column.
e.g.

DECLARE var_a VARCHAR(10);

DECLARE var_b VARCHAR(10);

DECLARE var_c VARCHAR(10);

 

DECLARE crsr CURSOR FOR

SELECT col_a, col_b, col_c FROM schema.mytable;

132 views
0 replies
Need information about Topic by Jayant2306 22 Aug 2016

Hi All,
I am trying to tune a query.
Basically I joinning two table A,B on columns Col1. both having different Indexes
Example: select * from Table1 A
inner join Table2 B
on A.Col1 = B.Col1
and A.Col2 = B.Col2
In table A Col1 is defined in Join Index and in Table B Col1 is defined as SI.
and Col2 is not defined as any Index types..

104 views
1 reply, 3 years ago
209 views
7 replies, 3 years ago
How to convert the varchar to time(6) In Teradata? Topic by urskumar 19 Aug 2016

Hi Experts
 
I have time value in the source with the datatype varchar(100), Need to conver this to time(6).
 
values with the varchar 11:30, 12:30: 01.00 like this...Need to convert these values to Time(6)
 
 

175 views
2 replies, 3 years ago
Create NUPI and USI having the same Column Topic by hyma 30 Jun 2016

Hi
Under which circumstances does it make sense to define NUPI and USI having the same column?
It sounds curious, isn't it?
Thanks.

182 views
6 replies, 3 years ago
Padding and timestamp Topic by krishna1985 18 Aug 2016

Hi All,
 
I have a column with the format
column x and beow are the values. 
10/1/15
4/1/16
7/1/15
I want to convert the same into 2015-01-10 00:00:00 and same for others. I want to pad month  AND date to 0 if its single digit. I tried run the beow substring first

192 views
3 replies, 3 years ago
How to install Teradata Express on Windows 7 64 bit machine? Topic by adiideas1 28 Feb 2013 teradata express

Folks,
 
I am new to teradata and to this forum. I am looking to install Teradata Express on my laptop.
On the downloads.teradata.com, it says VMware is to be installed but link is not active for Windows 7 OS.
If anybody can provide some pointers, it would be great.
 
Thanks
Adi
 
 

4409 views
6 replies, 3 years ago
Set QueryBand as JDBC Connection Parameter Topic by dfranks44 18 Aug 2016 jdbc, query_band

Hi all,
I would like to perform query banding at the connection level.  We are trying to track down a blocking issue, across a couple hundred, that are all hitting a single metadata table.  A few are not playing nice and we would like to use query banding to narrow it down.
 
I am currently trying the following but it doesn't seem to be working:

304 views
4 replies, 3 years ago
SQL command for setting connection option to return generated keys Topic by sdc 15 Aug 2016

Hello,
I am setting the following parameter in a connection string:

131 views
2 replies, 3 years ago
Resource Monitoring While Running Sql querries Topic by bhushan.koli 19 Aug 2016

How to mointor CPU,Memory,and KB/sec  while running querries in teradata 

88 views
1 reply, 3 years ago

Pages