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.
MULTISET table from dbc.tables? Topic by tdreturn 1 hour ago

Hello,
Is there a column I can tap into to figure out if a table is a multiset. RequestText in DBC.Tables is not a good column as it has the latest requesttext, so if the table was altered it has that DDL and not the CREATE TABLE statement? The CheckOpt column also does not seem to be a good indication of a MultiSet table. We are on the 14.10.03.03 Release. 

15 views
0 replies
Create view referencing recursive view, trying to concatenate field Topic by simonhx 2 months ago 6926, error 6926, recursive view, concatenate, nested recursive view

Hi,
I've been struggling to get the following piece of code to work - is there no way to get the working select statement below (See comment ** Working **) to work within a view?

115 views
2 replies, 2 hours ago
Importance of format 'X(n)' in varchar Topic by n_shashi 2 hours ago

Hi ,
When we increase the column size using alter table, previous format is saved in the field. For Eg: When we increase size of a column say col1 from varchar(20) to varchar(200), the previous format , format 'X(20)' will still be used in the field definition,
When we use format 'X(200)' explicitly we will have the same format. Can anyone help me answer below questions?

19 views
0 replies
Need help on converting Integer and date to timestamp column Topic by depook 4 hours ago Integer and date to timestamp

create table db_name.test

(Starttime INTEGER,

Row_Date DATE FORMAT 'YYYY-MM-DD' )

 

insert into db_name.test values(1520,'2013-09-11');

insert into db_name.test values(830 ,'2012-05-21');

insert into db_name.test values(400,'2012-03-19');

insert into db_name.test values(1625,'2012-07-07');

33 views
1 reply, 3 hours ago
Aggregation/WHERE/HAVING statements in Teradata 13.10 vs 14 Topic by iamtrombone 20 hours ago

We have recently upgraded from TD 13.10 to 14. All queries we used to run such as the query below ran fine with no issues in TD 13.10. We clearly have an expression that is dervied from two aggregation functions in the WHERE clause. As I mentioned, this has not been an issue ever with TD 13.10.

63 views
1 reply, 7 hours ago
Tracing stored procedure parameter values Topic by subu501 1 week ago StoreProcedure Parameter values

For one of our use cases we use AccessLogV, DBQLSQLTbl , DBQLSQLTbl to trace stored procedure executions.
In order to trace its parameter values we referred QryLogParam. But the data are not traceable.
Which is the best mechanism (from the Teradata log info) to trace stored procedure calls and their parameter values?

109 views
1 reply, 9 hours ago
How to find if a varchar field has 9 digit intergers Topic by raj_tera 6 days ago

Hi,
I would like to know how to find if a varchar field has integer values with length 9? this field is 90 chars in the table. the challange is the value 9 digit integer could be mixed with varchar values like this, sample -
 
sr#985301223
sln932876532 ars
prm564321560tyr
Teradata version is 14, I can't create/install any udf. please help.
 

213 views
5 replies, 14 hours ago
Non duplicate row selection query Topic by johnsunnydew 2 weeks ago

Hi there,

576 views
17 replies, 16 hours ago
Any DBQL conversion needed for 14.10 vs. 14.00? Topic by dnarva 17 hours ago dbql

Are any conversion scripts needed for upgrading from TD 14.00 to 14.10?
DevX appears to show a single set of scripts for all of 14.xx, suggesting none needed; so looking for confirmation that no changes would be needed for our existing DBQL scripts.
Thanks,
Dan

27 views
0 replies
How to get min and max value in a single olap query using ROW_NUMBER in teradata Topic by kumar_abhilash 1 day ago

I have data like this.

ds_id                          Version    dwn_dt

----------------------------------------------------------

1697130072               1.3.9      2014-11-13 

1697130072               1.3.9      2014-11-13 

1697130072               1.3.9      2014-11-06 

1697130072               1.3.9      2014-11-06 

64 views
1 reply, 22 hours ago
Need query for this Topic by prasadh_p 1 day ago

I/p:
SRC     DESTN      DIST
HYD     BNG       700
BNG    HYD       700
BNG    CHN      400
 
O/p:
SRC      DESTN    DIST
HYD     BNG         700
BNG    CHN         400
 
 
 

44 views
1 reply, 23 hours ago
Using Dynamic databasename and tablename in stored procedure Topic by teradatauser2 2 weeks ago

Hi,

I have to write a query : 

Sel count(*) from databasename.tablename in a stored procedure. Now, the databasename and tablename would come as a parameter from the user while calling this SP. i tried to write :

Sel count(*) into :var1 from :databasename.:tablename, but this doesn't work.

310 views
8 replies, 23 hours ago
PL/SQL to a valid Procedure Topic by Anonyme 2 days ago

Hi experts.
Could anyone convert this PL/SQL to a valid Teradata Procedure:
whenever sqlerror exit sql.sqlcode;
SET serveroutput ON;
Declare
vRowid varchar2(100);
vN.GES%TYPE;
CURSOR VJE IS
SELECT  G_T1.ROWID, G_T2.GES
FROM PRC G_T1
LEFT JOIN PRD G_T2

60 views
1 reply, 1 day ago
Enforce row count in a table Topic by punitgupta87 1 day ago #database #teradata

Hi all
I have a table like BUSINESS_DATE_TBL which has 2 column of 1 date type and other varchar( this is one i use to create parameter).
my complete production load is dependent on this table as date in this table ensures for which day load will be triggered.
 

27 views
0 replies
Creating function returning DATE from table Topic by dzeron 4 days ago database, create function

Hi Everyone,
We've got a need to create Teradata function (TD 15) which will return date from a table. Date in this table is changed by the other process. This is migration for existing process so it have to work like before.
More detail below:
CREATE MULTISET TABLE par_table (
par VARCHAR(10),
par_date DATE
)
UNIQUE PRIMARY INDEX (par);

110 views
2 replies, 1 day ago
Backup Topic by raddatz.dennis@gmail.com 1 week ago

Has anyone experienced a 30% slowdown in backups after upgrading from v12 to v14.10?
If so, how did you tune it to perform better?

160 views
2 replies, 1 day ago
How to find the Object IDs form DBC where it is stored. Topic by Sankalp.C 1 day ago

How and where Objects are stored and where IDs corresponding to them are stored?

34 views
0 replies
Tune query Topic by Tnewbee 5 days ago
95 views
2 replies, 1 day ago
Which VMWare Player version? Topic by JimHudd 2 days ago vmware player internal error

Hi All,
Are there any known comptability issues with running the TD VM's on a later version of the VMWare player?  I'm using Version 6 and the TD15.0 VM image works fine.  I need to run it on another PC which has VMWare Player V7.1 on it and the image won't run and gives an "internal error".  I can't downgrade the player as another VM on that machine needs the later version.
 

40 views
0 replies
Performance with pertitioned table Topic by Moutusi 6 days ago range partition

Hi,
I have a table having below structure:
CREATE MULTISET GLOBAL TEMPORARY TABLE T1 ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT,
DEFAULT MERGEBLOCKRATIO
(
ID DECIMAL(18,0),
STRT_DT TIMESTAMP(0),
COL1, COL2, .....)
PRIMARY INDEX ( ID )
 

262 views
7 replies, 3 days ago
To split the data in percentage in large table and to load to subtables Topic by Chethana08 4 days ago

Hi All,
I would need a query for below mentioned logic:
1)I have table which has huge data(In terms of Million).
2)I need to split the data into 4 parts(If I consider whole data as 100%,parts would be then 25%).
3)Data flow should be to load 1st to 25%,then 26th% to 50%,51to 75% and final load would be 76% to 100%.
 

218 views
2 replies, 3 days ago
Locking Table for Share Topic by sharib hussain 4 days ago #Locks, locking modifier, locking

Can anyone tell me something about locking modifier "LOCKING ROW/TABLE/DATABASE FOR SHARE".  Is it same as READ lock??

locking table student.employee for share

select * from student.employee;

 

  1) First, we lock a distinct student."pseudo table" for read on a

     RowHash to prevent global deadlock for student.employee. 

219 views
2 replies, 3 days ago
Intentionally Stale Bookend Statistics to get past inconsistent right-side stats extrapolation by query optimizer Topic by JerryLusa 3 days ago statistics, query tuning, performance tuning, collecting statistics

Here's a clever way to force the query optimizer to follow the same *stable* plan for a query regardless of the data set it runs against.  Useful when the data set cardinalities and row count profiles are well understood.  Also useful when ID numbers increase and the query optimizer would have to extrapolate past the right-most interval.

84 views
0 replies
Teradata database restart? Topic by barani_sachin 05 Aug 2013 TD restart, node failure

Hi All,
Have scenarios like this please tell and explain the outcome.
What if a node fails in a clique? with and without a hot stand by node.  Will TD restart in both the cases or not and how will be the performance?

1843 views
8 replies, 4 days ago
How to check size of the table with compress and without Topic by alkin_thumoti 6 days ago

Hi, pls can you explain me how COMPRESS works ? 
I created this tables :

create table db.no_compres

(id integer , 

 Valu integer);

 

 create table db.compres

(id integer,

 Valu integer compress -2 );

 

Data in those tables are  id <1,300> and Valu {-2}

 

 

Finding the size of tables 

91 views
1 reply, 4 days ago

Pages