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.
Import data from SAS using Teradata SQL Assistant Topic by stahengik 2 hours ago

Hi,
We have data in SAS server and we need to get some tables in teradata. 
The way we are doing it now is using SAS to write data in teradata database, I want to know if there is way by which I can pull data from SAS in teradata using teradata SQL assistant.
Please guide / give some references to study
 
Thanks!

9 views
0 replies
c / END TRANSACTION - Max. number of statements Topic by firstj 4 hours ago BEGIN TRANSACTION, end transaction

Can anyone confirm the max. number of SQL statements that can be run between BT; / ET; statements when running in Teradata V14?
 
Thanks

13 views
0 replies
select value from string with varying position Topic by hazard01 2 days ago

Hi  Hope you can help. 
I am trying to return a monetary value from a string where the position of the value varies in each row.
Typical examples:
BA/DC:   12/23:111C  DATE:01/01/1900 AMT:     $5.99
AB/CD: 45/67:456A DATE:01/01/1900 AMT: $5.99

55 views
2 replies, 4 hours ago
JOIN INDEXES WITH PRIMARY INDEX Topic by Jugalkishorebhatt1 4 hours ago JOIN INDEXES WITH PRIMARY INDEX

Hello All,
 
Why we cannot have JOIN INDEXES with UPI/USI. If there is a option to create a Join Indexes with UPI/USI, how can it be done.
 
Thanks
Jugal

12 views
0 replies
Teradata Pivot Topic by dr.murthy_td 2 days ago

I have a requirement where i need to implement pivot to achieve below result.
 
Source:
EMP_ID,Date,Seq_nbr,Punch
123,20-nov-2014,1,08:20
123,20-nov-2014,2,12:50
123,20-nov-2014,1,14:12
123,20-nov-2014,2,18:00
 
 
Target:
EMP_ID,Date,Seq_nbr,Punch_in,Punch_out
123,20-nov-2014,1,08:20,12:50

37 views
1 reply, 6 hours ago
Need help on creating table. Error 3933 Topic by prasanth225 2 days ago

Hi All,
 
I am trying to create a table with app. 400 columns, out of which most of them are 'Varchar'. But I am getting an error as-3933 'Max row length exceeded'. I kept the minimum column width for all the columns. I cannot reduce the column widths further as it will impact while loading the data. 
 
Any solution for this issue?
 

26 views
1 reply, 6 hours ago
Delete old records from a table after a period of time Topic by yiannish 1 day ago trigger, delete

The problem:
I have a log table that will have a large number of individual inserts or rows each day(about 500).
I want to find a way to be able to delete all the lines that are for example more than 10 days old.
 
I believe this can be done with triggers. I have searched a lot but couldn't find an implmentation on teradata syntax.
 

28 views
1 reply, 6 hours ago
Execute permission Topic by BlaineKinnebrew 1 day ago permission, execute

What is the difference between EXECUTE and EXECUTE PROCEDURE permission?

What is the difference between EXECUTE and EXECUTE FUNCTION permission?
Thanks,
 
Blaine
 

 

 

26 views
1 reply, 6 hours ago
Timestamp and date calculation Topic by Harpreet Singh 5 days ago

Hi ,
Dieter once shared a nice article on timestamp, time and date calculation, i just misplaced link and not able to search it again on forum. If you have the link , please share.
Regards
harpreet

36 views
1 reply, 7 hours ago
How to decide about Stats for new queries Topic by GianTD 1 week ago query, stats, tuning

Hello All !
 
I am bit new to Teradata and started working on it couple of months back.
 
I working on performance tuning suggestions for some new queries.
 
Wondering if anybody can help on:
How we can decide for the stats for new queries. I mean, the queries which are not in production yet.

300 views
16 replies, 9 hours ago
GRAPHIC and VARGRAPHIC data type Topic by Jugalkishorebhatt1 1 week ago GRAPHIC and VARGRAPHIC data type

Hello All,
 
How to use Graphic and Vargraphic data types. What is the purpose and need of these data type.
 
THanks in Advance
Jugal

100 views
3 replies, 10 hours ago
Identify the queries Topic by GianTD 6 days ago

While working on multiple queries for tuning... How i can identify the queries while getting the DBQL details
For ex: I have 20 queries from developer, need to provide recommendations for performance. I need to run thru multiple iterations, making changes, again run, & check for CPU, Spool, rows etc.

141 views
8 replies, 10 hours ago
Row counts of tables Topic by GianTD 10 hours ago #ROWCOUNT, count(*), total rows

Hello !
Is it possible to check any View/Table in Teradata to find Row counts of all tables in a Database?
If not, how to get the same?

16 views
1 reply, 10 hours ago
copy/backup table Topic by amadu 14 hours ago dnoeth; raja_kt, dnoeth;Raja_KT;fred;feinholz;Fred;Adeel Chaudhry;ulrich;M.Saeed Khurram

I want to copy/backup an entire table with a different name so i can make some updates and test those changes on my version of the table.
Can you please provide help on how to do this?
Best Regards
Amadu
 

24 views
1 reply, 10 hours ago
Queries with CPU timeout Topic by GianTD 3 days ago

I have few queries which are getting CPU timeout.
 
What should i consider in order to tune those queries?

94 views
5 replies, 19 hours ago
Time Zone String Instead of Offset Topic by kmiesse 2 weeks ago time zone string, timezone string, time zone string offset

When querying a TIMESTAMP WITH TIME ZONE column, is it possible to return the TIMESTAMP WITH TIME ZONE value using the time zone string (e.g. Americ Eastern) instead of the numeric offset (e.g. -04:00)? For example, I would like to return '9/26/2014 09:00:00.000 America Eastern' instead of '9/26/2014 09:00:00.000-04:00'.
Thanks in advance!

127 views
5 replies, 1 day ago
%VSTR,%FSTR,etc Topic by Alpesh 22 Dec 2006

Hi,Can anyone tell me what does %VSTR, %FSTR, etc means in the error messages. Where can I find the meaning of such abbreviations ?Thanks in advance.Alpesh

12973 views
3 replies, 1 day ago
rowkey Topic by jacksprat 13 Jun 2008

Could someone explain what a rowkey is? I have been able to find definitons of row hash and row id, but not rowkey.

20937 views
7 replies, 1 day ago
Issues with Decimal Field in Fastload Script Topic by voleary 1 day ago

Hi- I am using a fastload script to load a .csv into Teradata. The only problem I am having is with importing the data in the   "Charge" column as a decimal. Typically data in this column is as such:
"Charge"
0.231
0
0.043
1.45
3.743
 
 

30 views
1 reply, 1 day ago
How can I get the actual value of %VSTR or more error info? Topic by gpolanch 27 Mar 2012 error handling, errorcode, sqlstate, sqlcode, %vstr, dbc.errormsgs

Hello,

Our application consists of stored procedures.  I want to the log errors to a table.  I can get SQLSTATE and SQLCODE, but how do I formulate an error message that can be understood by humans, and conveys the actual value of %VSTR?  For example, for ErrorCode 3807  "Object '%VSTR' does not exist.",  how to determine which object does not exist?

3575 views
1 reply, 1 day ago
issue with WITH clause and throing eroor like WITH IS NOT ALLOWED IN A SUBQUERY OR A VIEW Topic by Kumar@TD 4 days ago

Hi 
am facing an issue with WITH clause and throing eroor like WITH IS NOT ALLOWED IN A SUBQUERY OR A VIEW
pls post syntax to use in BTEQ scrip?
how to use with clause on DBC.DISKSPACE . any help will be appreciated
INSERT INTO TD_DISK_USG
(
DATABASENAME
,CUR_DT
,PRMNT_SPC_ALCTD
,PRMNT_SPC_USD
,RMNG_SPC_GBS

86 views
5 replies, 1 day ago
Connecting Multiple Teradata Servers Topic by abhijit.p 5 days ago #teradata, bteq, different servers, teradata utility

Hello All..
Greetings of the day..
 
I have a doubt regarding connecting to multiple TD servers.
Till date I have done my works in a particular server, now I need to be involved in 2 servers. Below is the scenario, Would need little bit guidance here.
Server-1 IP: A.A.A.50   Server-2 IP: A.A.A.100

105 views
6 replies, 1 day ago
Currentperm more than Maxperm on one AMP for database Topic by Sandeepyadav 1 week ago

Hi All,
 
We are facing an issue regarding some skew.
 
When we assign space to a database then this space get divide even to the all AMPs. So any amp has limited space for database. Ex. If database d1 has 10 GB space and we have 10 Amps than each amp will have 1 GB space for database d1 and table size cannot occupy space more than 1 GB in any amp for database d1.

71 views
2 replies, 2 days ago
sliding window merge join Topic by ramjasmeenakshi 1 week ago dnoeth;Raja_KT;fred;feinholz

Hi,
Can somebody pls help me to understand sliding indow merge join.I know it happne for PPI to No PPI table or both PPI but joining on different column.I want to understand process.

92 views
3 replies, 2 days ago
help on tuning a query Topic by sgarlapa 1 week ago tuning, join, non usage of parition

SELECT
col1,col2
FROM
staging_table STG
INNER JOIN
target_table TGT
ON
STG.SRC_TRAN_ID=TGT.SRC_TRAN_ID
WHERE
TGT.ROW_STAT_CD='Active'
AND TGT.SRC_SYS='sourcename'
In above query, both STG and TGT has PI as SRC_TRAN_ID
TGT has stats collected on ROW_STAT_CD and SRC_SYS

114 views
4 replies, 2 days ago

Pages