All Forums

For topics that do not belong to another forum. This includes general development topics, such as Java, .NET, User Interface design, etc., as well as discussion of the Teradata Developer Exchange itself. For articles, blogs and more, see the General section of the site. Do not post SQL or database questions here; they belong in the Database forum. JDBC/ODBC questions belong in Connectivity.

You must login to post to the forums.
tuning query Topic by radsubra 28 Aug 2015

Below query is taking a long time to execute.Any suggestions would help
 
SELECT    PM_VSMSMT7O3EIKY6L6SY2ZNDUT2UQ.TRX_SC_ID , PM_VSMSMT7O3EIKY6L6SY2ZNDUT2UQ.SALES_ORDER_LINE_KEY ,
        PM_VSMSMT7O3EIKY6L6SY2ZNDUT2UQ.SHIP_TO_CUSTOMER_KEY , PM_VSMSMT7O3EIKY6L6SY2ZNDUT2UQ.SK_SALES_ORDER_LINE_ID_INT ,

583 views
1 reply, 4 years ago
to know the stats defined for the table Topic by fayaz87 29 Aug 2015

Hi dude's,
I need to know the stats table to check when that column has introduced in the table.

461 views
1 reply, 4 years ago
error: expecting ON keyword between sgsg_ck and where. please help me Topic by santhosh4b9 29 Aug 2015

INNER  JOIN 

(

SELECT 

SGSG_CK,

SGSG_ID

FROM ODS_PRD_STG_VW.CMC_SGSG_SUB_GROUP_STG

WHERE SGSG_ID ='H001'

)  SSG ON MPE.SGSG_CK=SSG.SGSG_CK  WHERE MMS.GRGR_CK='$$GRGR_CK'

400 views
1 reply, 4 years ago
Changing time format and adding to date Topic by anusuit1190 06 Aug 2015 timestamp, date, format change

Hello,
I have time in format HH:MM and date in format mm/dd/yyyy. I want COL1 with time formated as HH:MM:SS and COL2 a combination of COL1 and date in format MM/DD/YYYY HH:MM:SS.
Also, then I need to subtract COL3 (format mm/dd/yyy hh:mm:ss) from COL2.
How can I do this?
 

765 views
1 reply, 4 years ago
using a calculation done in the previous row in this row's calculation Topic by tbenard 10 Apr 2013

I am doing a query in which the results of a previous row calculation are used in the next row calculation (recursive I guess).
 
For example the results should look like this:
 

Item

Loc

Week

A

B

C

Inventory (Prev Inv + A + B - C)

 

1111

aaaa

201301

7321 views
20 replies, 4 years ago
Querying the data between 2014 and current date Topic by dataminering 23 Jul 2015 Quer, where, invalid, timestamp

Hi all,
I have some problem about the query which finds the data between 2013-12-31 and today
I took invalid timestamp error.
The query I used looks like this:
select * from table1 where the_date between '2013-12-31' and current_time
 
Please help me!
 

943 views
3 replies, 4 years ago
BTEQ Import Data file error Topic by meta 01 Apr 2010 bteq

Hi Gurus

Iam trying to import datafile into a table using BTEQ import...getting the following error
any help appreciated...
Thanks

*** Starting Row 2 at Wed Mar 24 15:40:18 2010

*** Failure 3706 Syntax error: Column name list longer than value list.
Statement# 1, Info =442

*** Warning: Repeat is cancelled.
*** Finished at input row 4 at Wed Mar 24 15:40:19 2010
*** Total number of statements: 1, Accepted : 0, Rejected : 1

*** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

8579 views
5 replies, 4 years ago
Stored procedure - Facing error while executing Call statement Topic by Madhum 08 Jul 2015

Hi,
 
I have createda procedure and it was success but while execuing the call procedure statement by passing the parameter values I am facing an error stating Failure 3706:syntax error expected GLOBAL TEMPORARY.
I have not defined any temporary tables insie the PRO.
Please help
Thanks 
Madhu

1349 views
6 replies, 4 years ago
AMP Count vs SkewFactor Topic by gnanareddy 14 Aug 2015

Hi Team,
Did the AMP count have impact on the skew factor?
Case: TableA skewfactor in DEV is 3.11 (AMP count is 88), in PROD is 8.33 (AMP count is 288). (DDL&Data is same).
Calculating sewfactor "(100 - (AVG(CURRENTPERM)/MAX(CURRENTPERM)*100)) AS SKEWFACTOR FROM DBC.TABLESIZE".
Please suggest on this.
Thank You,
Regards,
GnanaReddy.

511 views
1 reply, 4 years ago
Stored Procedure in Teradata Topic by AMIT_TERSE 30 Dec 2014 @dnoeth@Raja_KT

Hi All,
My Company does not encourage me to use Stored proc since it a single amp operation and consumes lot of resource.
But I have also heard that single amp query works faster, so it sounds quite contradictory can some one expain me the same.
Thanks in Advance!!

2466 views
12 replies, 4 years ago
Grouping Data with same matching data in a grouped section Topic by manmarirama 14 Aug 2015 Grouping pattern matching data

I have a situation not sure if i am putting it right way, I have a grouped data as below 

EFF_ID

CMD1

CMD2

PBProfileNm

ProfName

absprod

ksh

ANY

pbentpcl

aladdin

absprod

ksh

ANY

pbentpcl

arpine

absprod

ksh

436 views
1 reply, 4 years ago
Get Minimum Price from Overlapping valid dates Topic by kiranrajpv 11 Aug 2015 Overlapping date, minimum price from overlapping dates

Hi , Need your help !!! New to Teradata 

 

prod_id    price     vld_fr_dt        vld_to_dt

801462  100.00   2/9/2003     12/31/9999

801462  178.00  4/18/2004    12/31/9999

801462  205.00  2/9/2003      12/31/9999

801462  50.00    5/18/2005    12/31/9999

801462  250.00  1/5/2003      2/8/2003

 

Need output like : 

908 views
7 replies, 4 years ago
Select is getting failed with error "SELECT Failed 3610" Topic by gnanareddy 10 Aug 2015

Hi,
In my prod environment "SELECT * FROM DB.TBL1" is getting failed with error "SELECT Failed 3610:  Internal error. Please do not resubmit the last request. SubCode: 0, 3701". Same query is running in my DEV environment.
This table has 42 columns.
SEL col1,col2, col3, col4 ... FROM DB.TBL1;
col3: DECIMAL(12,0) COMPRESS 

628 views
2 replies, 4 years ago
enable encryption in odbc.ini file Topic by Siddhu.85 07 Aug 2015 odbc.ini, encryption, encryption channel, UseDataEncryption

Hi,
We are using Teradata TTU from our Linux(Red Hat 6) server to connect to teradata via Ab Initio tool.
We are trying to enable encryption in the network layer of connection from our Linux server to Teradata server.
So to do this from my research and analysis, we were able to figure out that we need to add "UseDataEncryption=YES".

781 views
1 reply, 4 years ago
Stats manager in view point Topic by Radsubra2003 20 May 2015

Hi,
 
Iam trying to create a new analyze job in stats manager in view point.
Iam not able to view the database tree in view point.Can someone tell me what is the reason?
 
Iam getting no matches like below.Can someone tell what access Iam missing. In Teradata administrator Iam able to see the database tree with database and tables.
 

1477 views
2 replies, 4 years ago
Bteq script to read and execute query from a table Topic by arya.s 06 Jun 2012

Hi,

 I have a table with N number of records with following format:

 

col1

col2

col3

col4

sel count(*) from  Table_S1

sel count(*) from  Table_T1

x

x

sel count(*) from  Table_S2

sel count(*) from  Table_T2

x

x

30313 views
10 replies, 4 years ago
A NEW DBA DOUBT - Can we add NULL value in USI ? Topic by SSM 03 Aug 2015 #usi

Dear All, 
I have a weird situation, where one my application team asks us to add a column to an existing table, the new column will get populated after 2 months. Until two months they want to keep the values to Null, after which they shall load the data into table which will be unique, they are asking if we can declare this column as USI ? 

621 views
1 reply, 4 years ago
How to update a datatype of a column in a table having huge data Topic by anagpure 28 Jul 2015

Hi,
we have one table in teradata having millions of records. Now we want to change a datatype of a column(having data in it). what is the best way to do this ?
while doing this which type of locks would be applicable to the table ?
Thanks in advance.
 

1534 views
11 replies, 4 years ago
Data integrity in Teradata stored procedures Topic by anagpure 29 Jul 2015

How do you make sure data integrity is maintained in stored procedures in teradata ?

660 views
2 replies, 4 years ago
TD server performance issue - Queries running longer on TD server - Stuff to be checked Topic by chill3chee 23 Jul 2015 server performance, queries running longer

Greetings Experts,
I am trying to learn TD DBA part and was searching for the list of activities to be monitored when the performance of TD server is degraded or the queries are taking unusual longer time to complete there by impacting the SLA.
Can you please share the list of action items to be checked to fix this.
Thanks,
Cheeli.

600 views
0 replies
Using Liquibase Topic by escueta 25 Aug 2014

Has anyone been able to use Liquibase with Teradata 14?
I keep on getting this error:

SEVERE 8/25/14 12:52 PM:liquibase: Connection could not be created to jdbc.terad

ata://wdstddbdev1 with driver com.teradata.jdbc.TeraDriver.  Possibly the wrong

driver for the given database URL

1172 views
2 replies, 4 years ago
How I filter special Chars(*&^%...) in the WHERE clause, i want to pick just Alphanumeric. Topic by Shoushounette 20 Jul 2015

Hi guys!
like the title is saying, i want to pull just the alphanumeric data from a column
i tried : select * from tableX where columnY NOT LIKE '%[^a-Z0-9]%' but it's not working.
EX:  COLMNx
     qwni546
     vdfo&345k
     noi7#b)f
output should be:
     COLMNx
     qwni546
-----------------------

1154 views
4 replies, 4 years ago
Transpose the column with removing the duplicate string Topic by ritesh466 17 Jul 2015 Remove repeated String

Hi Everyone, 
Need help to acheive this below requirement.
Input Data  Setup :

Store_line_no store_no str1

1                  10           APPLE|Apricot

2                  20           Banana|Mango

2                  30           Orange|Orange|Strawberry

3                  50           Grapes|Guava

695 views
2 replies, 4 years ago
Changing display/format of Teradata SQL Assistant Result Topic by anusuit1190 15 Jun 2015 teradata SQL assitant, format result, output

Hi,
I am using Teradata SQL Assistant v14.10 and want to manipulate the way result is displayed when I run my query. I want to do the following things-

  • When exporting result in TXT file, I do not want to display the column names.
  • I want the time format in “hhmm” instead of “hh:mm”

 

2308 views
9 replies, 4 years ago
useage of RequestTxt in dbc.table Topic by chk32 16 Jul 2015

Hi ,
I want use query form requesttxt of dbc.table , but  datatpe of requesttxt is varchar(12500). so, My query is getting truncated . Please advice if there is any other table with exact ddl query.
I want to insert this ddl query to other table. Is it possible to acheive this in any other way.
Apparantly insert into tableB show view tableA doesnt work.

571 views
0 replies

Pages