Quantcast
Channel: Teradata Forums - All forums
Viewing all 27759 articles
Browse latest View live

teradata DBA training - response (25) by ramesh0725

$
0
0

Any good textbook for teradata? 


Conversion of numeric to date and group by it. - response (1) by dnoeth

$
0
0

This should work, extract the date portion and modify it to match the internal storage:

cast(col / 1000000 - 19000000 as date)

Dieter

Re: remove the CRLF in the fastexport generated file - response (2) by dnoeth

$
0
0

This should be done using a UDF, check if oTranslate or oReplace is installed on your system, if not you should tell your DBA to do it :-)
Dieter

Performance considerations during taking back up-- - response (1) by dnoeth

$
0
0

Hi Nishant,
if i had to rank the different scenarios it would be:
#1: first scenario
#2: create table as existing_table with no data plus ins/sel
#3: second scenario
 
- "create table as existing_table" is simply copying datablocks without any spool
- INS/SEL is also not using any spool if source and target have exactly the sams DDL
- MERGE might be more efficient than INS/SEL, but definitely not in this case
Dieter

How to retrieve the Relative Record Number? - response (11) by KS42982

$
0
0

If you do not care about the HHMISS (last 6 digits of your numeric_column) then you can do the same that you did in excel by using SUBSTR function and fetch only first 8 and assign the name to it and use that to group by.

Performance considerations during taking back up-- - response (2) by KS42982

$
0
0

One thing I'd like to mention about scenario # 1 ( create table as existing table with data) that if your existing table has few PIs, SIs, partitions then teradata would not create the same in the new table (it will give the defaul PI to the new table) and that may cause the delay in inserting the records, especially when you have lot of records to insert. So just make sure of that.

Performance considerations during taking back up-- - response (3) by dnoeth

$
0
0

"CREATE TABLE AS existing_table" creates an *exact* copy of the existing_table including PI/SI/Partitioning, etc.
There are only two things which are not copied: Foreign Keys and Triggers.
But of course you're correct if it's "CREATE TABLE AS (SELECT...)" 
Dieter

Performance considerations during taking back up-- - response (4) by KS42982

$
0
0

You are right, I meant, CREATE TABLE AS (SELECT..) only.
I never tried "CREATE TABLE AS existing_table" but it's good to know that it copies all the indexes, will use that from next time.


Re: remove the CRLF in the fastexport generated file - response (3) by balu_td

$
0
0

Hi Dnoeth,
Thanks for replying..
I dont have an option to use OReplace or OTranslate.. Is there any other way i can get out from it..
 
Thanks
balu

Only an ET or null statement is legal after a DDL Statement - forum topic by barca4321

$
0
0

I am working on a Narrow Cast Server project in Microstrategy; teradata is the database. We have configured an ODBC connection to connect the NCS to teradata.
I get an ODBC error while trying to execute a multi pass sql using the ODBC connection. However, a simple query runs fine.  
The complete error is " Database Classes][Error] Execute Query failed. Error type: Odbc error. Odbc operation attempted: SQLExecDirect. [25000:-3932: on SQLHANDLE] [Teradata][ODBC Teradata Driver][Teradata Database] Only an ET or null statement is legal after a DDL Statement."
The sample sql is as belows:
=============================================
 

SET QUERY_BAND = 'Project=Example2;Report=0315-17.11;MSTRUser=MSTRPORTAL_EXXXX;' FOR SESSION;

select * from table1;

SET QUERY_BAND = NONE FOR SESSION;

=============================================

The SQL executes fine when run directly against the database using SQL Assistant. 

 

I have discussion on this topic on many forums but haven't found any concrete solution. Below are the things I have tried:

1) I have tried explicitly using placing End Transaction followed Begin Transaction after the first pass. Actually have tried placing BT and ET at various points in the multi pass SQL without any luck.

2) Tried placing a null statement by including a blank ;

3) On the ODBC configuration, I have tried setting the Sesion mode to Teradata.

 

I have contacted Microstrategy support but havent had any resolution yet. One of their solution suggested its a teradata issue so here I am.

Any suggestions? This has been a tough one to crack. Will greatly appreciate any assitance

Forums: 

Teradata Studio Express JRE error during installation - forum topic by svpl

$
0
0

I am trying to install teradata studio express v14 in my Windows 7 32 bit pc and I always get a JRE not found/JDK not found error after installation. My PC is upto date with JRE and I update to the most recent JRE using Java automatic downloads. Can somebody please help?
thanks

Forums: 

Date Format In Teradata SQL Assistant - response (5) by KS42982

$
0
0

Looks like the last row is always the latest record of the 'name' column. In that case, it would be like below.
Select Name, max(create_time)
If that is not the case then you can use ROW_NUMBER() and give number to all the rows and use max of it by name to get the last record.

Teradata Developer - forum topic by radika

spool usage and spool space - forum topic by nyemul

$
0
0

Hi
 
If few SQL queries are run and highest spool usage value among all queries is obtained from DBQLOGTBL
Then does this mean that minimum spool should be set to highest spool usage value among all queries?
 
For example: query 1 shows spool usage as 10GB, query 2 shows spool usage as 40 GB and query 3 shows spool usage as 25 GB.
Does this mean that minimum spool space allocated should be at least 40 GB?
 
Niteen
 

Forums: 

SQL Syntax - forum topic by AsherShah

$
0
0

 
I have a view:
Create view VW1 as SEL col1, col2, col3 from tab1;
and I can run following SEL.
SEL a.col1, a.col2, a.col3, b.col4 from 
( sel col1, col2, col3 from VW1 where col2 = 'ABC') a
left outer join
(SEL col1, Col3 as col4 from VW1 where col2 = 'ABC'
qualify row_number() over ( order by col1) = 1
) b 
on a.col1 = b.col1;
 
I need to change above SEL to a View so that user can access with simple query like SEL * from VW2 where col2 = 'ABC'
Any suggestions?
 
Thanks
Asher
 

Forums: 

SQL Syntax - response (1) by ulrich

$
0
0

did you try to create a view like

Create view VW2 as 
SEL a.col1, 
    a.col2, 
    a.col3, 
    b.col4 
from 
( sel col1, 
      col2, 
      col3 
   from tab1 
   where col2 = 'ABC'
) a
left outer join
(SEL col1, 
     Col3 as col4 
 from tab1 
 where col2 = 'ABC'
 qualify row_number() over ( order by col1) = 1
) b 
on a.col1 = b.col1;

If yes, what had been the issue?
If no, what had been preventing you from doing so?

Only an ET or null statement is legal after a DDL Statement - response (1) by ulrich

$
0
0

As you wanne use the query band setting only for the one sql try
BT;
 
SET QUERY_BAND = 'Project=Example2;Report=0315-17.11;MSTRUser=MSTRPORTAL_EXXXX;' FOR transaction;
select * from table1;
ET;
 
at least it worked for me in V2R14
 
Ulrich

Mload error - Highest return code encountered = '23' - response (3) by cheeli

$
0
0

Thank you Dieter for your time on this.  The error code was

DBCErrorCode

6,706

I have gone through the previous posts on this error code and figured that it was a problematic non Ascii characters. (We have had same issue in the flat file)

Log out action method - forum topic by KontantinK

$
0
0

Hello,
if the user log out from viewpoint, I want to execute a method in my portlet. Is there a way how can I do it? If the user open the portlet, the portlet opens a connection to the db over the class TeradataDataSourceFactory. If the user go out from the portlet, I want to close the connection. I Know I can close and open the connection by execute one or a group of sql statements. I cannot add a connection pool by starting the server, because the properties of the connection will be set over viewpoint.
I know I can use the a javascript method by removing the portlet, but this is not the solution that I´m searching for.
 

Forums: 

What is compress? With example pls explain?What is use of compress? - forum topic by sai_666

$
0
0

What is compress? With example pls explain?What is use of compress?

Forums: 
Viewing all 27759 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>