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.
teradata fastload error Topic by punitgupta87 37 min ago teradata fastload

Hi 
My teradata version is : 14.00.00.09.
In define part of tertadata Fast Load script , If I use  <cloumn name> date , teradata gives me an error which says  :

               Invalid column type for column: JOINING_DATE

              Only VARBYTE, VARCHAR or LONG VARCHAR column types

              supported for Variable-Length Text record type

6 views
0 replies
TIMESTAMP values gets updated with UTC values via Stored procedure. Topic by svragavan81 6 days ago database, stored procedure

We have the column defined as below
beg_ts TIMESTAMP(6) WITH TIME ZONE.
The column when updated via BTEQ, MACRO gives the output as below
8/21/2015 23:22:55.320000-07:00 (at local timezone)
when updated via stored procedure gives the output
UTC Time - 8/22/2015 06:22:39.360000+00:00 (at gmt)

93 views
2 replies, 1 hour ago
Top resource consuming query Topic by arpitsinha 2 weeks ago #performance #stats #teradata #DBA #tuning

Hi,
I have to get the top resource hungry queries...? If any one help with the queries which can give me top 10 distinct queries it will be very help full. I have onle select access on pdcrinfo views. It is on TD 14.10. Please help.

143 views
1 reply, 8 hours ago
Need help to write an SQL to validate mutiple date ranges combined from more than one SCD type2 tables. Topic by vamccc 3 days ago

Hi All,
I'm an ETL QA working on Teradata for last one year. I wanted to validate a view that is being derived from more than one SCD type2 tables. So, I have to create a date ranges based on the combination of dates available in the two(or more) tables. see the example below.
Table 1:

127 views
6 replies, 9 hours ago
Aggregation Topic by Gnana Reddy 15 hours ago SQL Aggregation

Hi,
Could you please help on SQL query for below requirement.
Source Data:

64 views
3 replies, 13 hours ago
Columnname on which error occurred Topic by chill3che 6 days ago Errored column name

Greetings Experts,
We doesn't have access to our PROD and we develop scripts and test in SIT, UAT.  When promoted to PROD, occassionally the following errors occur.
Invalid Date/Timestamp
Numeric overflow occurred
....

92 views
1 reply, 14 hours ago
Bad argument for ** operator - POWER function Topic by chill3che 14 hours ago POWER function, bad argument

Greetings Experts,

 

We are facing a strange situation in which the following sql skeleton is failing with the error "Bad argument for ** operator"  Please note that the datatype for columns used in POWER is DECIMAL(5,2)

27 views
0 replies
Reconciling AMPUsage and ResUsage Topic by TD2000 5 days ago ampusage, resusage

Hello,

123 views
3 replies, 14 hours ago
Method to find number of occurence of specific character in a string Topic by kirthi 3 days ago #sql, #STRING, #string handling

Is there method in teradata to find number of occurence of a specific character in a string?
Like if string value =  ' Teradata is Relational Database'
I need to know how many time letter 'a' is present in the above string.
Do we have any inbuilt functions in Teradata or will Regular expression help me on this?
 

118 views
4 replies, 15 hours ago
DROP USER "username" got failed due to Cannot DROP a user or database that has DBQL enabled. Topic by Jhansi Y B 21 hours ago

Hi,

 

When I Dropping an user, my SQL is getting failed with the following error.

"DROP USER "Username" got failed due to Cannot DROP a user or database that has DBQL enabled. "

Please help me in this.

 

Thanks,

Jhansi Y B

59 views
4 replies, 19 hours ago
TRIM Leading letters then Leading 0 Topic by kamu2015 3 days ago

I have a column that always has 12 characters.  The values can vary with how many leading letters and zeros they have.  
Example list:
A00294759323
HA2947037493
A29403829574
194093829593
D00284938293
000294869302
Desired output:
294759323
2947037493
29403829574
194093829593
284938293
294869302
 

76 views
2 replies, 19 hours ago
Teradata query tunning Topic by arpit.ubale 20 Oct 2014
explain
SELECT
  DIM_PFC_CUSTOMER_LIST_dim.DISTR_METHOD,
  DIM_PFC_CUSTOMER_LIST_dim.PFC_DESC,
  DIM_PFC_CUSTOMER_LIST_dim.KEY_ACCOUNT_DESC,
  DIM_PFC_CUSTOMER_LIST_dim.BANNER_DESC,
  DIM_PFC_CUSTOMER_LIST_dim.AREA_DESC,
  DIM_PFC_PRODUCT_dim.MANUFACTURER,
  DIM_PFC_PRODUCT_dim.BRAND_DESC,
  DIM_PFC_PRODUCT_dim.BRAND_SIZE_DESC,
  SEM_PFC_TPM.VIEW_DIM_PFC_PERIOD.YEAR_NO,
671 views
6 replies, 19 hours ago
How to get the user information. Topic by SriniD 24 Apr 2015

Hi,
I want to get the following details (User ID, full name of the user and email address) of the user. Can some one help me from which DBC table / View I can find these details of the user? Thanks!
Regards,
Srini.

454 views
1 reply, 20 hours ago
Cast CHAR Topic by sharatbalaji 2 months ago

SEL CAST('A'AS CHAR(10));
SEL CASE WHEN 1=1 THEN CAST('A' AS CHAR(10)) ELSE 'Y' END;
 
The first query gives 'A' followed by 9 spaces.
The Second query gives 'A' and no other spaces suffixed.
What is the reason for this difference in behaviour of cast function in CASE statement

614 views
1 reply, 21 hours ago
cast varchar value YYYY-MMM-DD HH:MI:SS to date Topic by sakthikrr 1 day ago cast, Convert free text date, date

I have a VARCHAR column (CALL_START_DATE_TIME) and it's values are as shown below.

 

2014-OCT-31 15:52:35

2014-JUN-25 13:53:30

2013-DEC-26 19:56:40

2014-AUG-08 22:43:51

2015-APR-22 03:57:04

 

I need to apply date wise filter on this column as below:

 

94 views
5 replies, 22 hours ago
i am new to teradata developement Topic by deepak03071987@gmail.com 4 days ago

i am new to teradata developent project. but we assign a new project. and we get only 5 days for our kt.
on which topic i should learn so i should be a good developer.
i always want to be good at what i do..but here i am confused .

81 views
1 reply, 1 day ago
Oracle Table to Teradata DDL Topic by muthu1802 4 days ago ora2td, oracle to teradata migration, oracle table to teradata table

I want to form a teradata table structure for a given oracle table.
Do we have any ways to acheive this ?
Also I heard about ora2td tool which will help to acheive this. but I do not have enough details regarding this tool.
Could someone help with this. If possible please share details regarding ora2td tool.
 
Thanks,
Muthu.
 

92 views
2 replies, 1 day ago
how to join multiple tables in Teradata Topic by Yunfei Zhao 3 days ago

how to join multiple tables in Teradata

suppose I want to join 3 tables with the code below.

a left join b on a.key=b.key
  left join c on ?.key=c.key

where
a.col=10
b.col=20
c.col=30

I have two questions.
Question 1: I want to know what to put for the '?' in the code. Can I use either a, or b?

88 views
3 replies, 1 day ago
Random sampling question Topic by diecast 3 days ago

I have a issue where I want a random selection of transactions but need them each from a user that handled them. Each user would of touched 50-100 transactions and I need a sample of 3 from each agent. I know how to randomly grab transactions but not how to make sure i'm getting them from each agent not just random as a whole. 

59 views
1 reply, 1 day ago
Submitting Procedures using BTEQ Topic by rupert160 2 days ago BTEQ PROCEDURES and COMPILE

It seems the only way to submit a Stored Procedure using BTEQ is to execute the compile command, as I've had heaps of trouble trying to

pump "Create Procedure..." straight into bteq.

 

To create an SQL stored procedure:

"invoke a text editor to create a file named example.spl, and enter the SQL stored procedure

46 views
1 reply, 1 day ago
Views - Internal execution steps Topic by Adeel Chaudhry 1 day ago view, explain, transpose, eavt, spool

Hi,
 
I have a quick question regarding processing of views.
 

38 views
0 replies
Teradata Stored Procedure GOTO Topic by Santanu84 2 months ago #STOREDPROCEDURE, error in stored procedure call

Hi
I am using TD 14.0 and writing a stored procedure where using GOTO I am trying to move to another Label.
But surprisingly it is showing me error as below.
 
SPL1027:E(L34), Missing/Invalid SQL statement'E(3703):'GOTO' is a Teradata SQL keyword reserved for future use.'.

384 views
2 replies, 2 days ago
Row Allocation to NOPI Table using FastLoad Topic by Santanu84 2 days ago #database #teradata #tpump #stream #NOPI #fastload

Hi All
I need help to clear my understanding on few points as mentioned below.
1.

67 views
1 reply, 2 days ago
10065 WSA E HostUnreach Topic by nithyanandam 12 May 2006

GuysJust wanted to find out if there is any solution for the above error.. Been searching an answer for the above problem for the couple of days but negative.Recently, installed the Teradata Demo CD and am struck up with the above issue.Let me know, if anyone has found any work-out for the aboveCheersNithyanandam.

120911 views
27 replies, 2 days ago
Stored procedures problem Topic by thirupathi.pattipaka 5 days ago create stored procedure, dynamic sql; parameters; stored procedures;

Hi all,
I'm new to the stored procedures in teradata. I wanted to give tables and database names as parameters in stored procedures, but it is not working. is it possible to create a procedure in teradata similar to this. I tried, it throwing error.

120 views
2 replies, 3 days ago

Pages