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.
Stats Collection Topic by Kishore_1 5 days ago stats collection

I am running a few stats collection statement ,sequentially , by reading and executing through a cursor called from within a stored proc.At any point, if a stats collection statement is failing ,due to "no more spool space" I have to manually monitor and restart the process after eliminating such statements.Is there any approach, that if the query is spooling out, it should capture the error in

164 views
7 replies, 14 hours ago
aggregate function based on multiple rows Topic by johnsnow 1 day ago sum, aggregate, join

I am trying to perform a sum based on multiple values in a table.
 
The current year week is formated like this 201401 for 2014 year and week 1.

164 views
9 replies, 17 hours ago
Failure 6760 Invalid timestamp Topic by kmanivan82 1 day ago

Hi Team,
when i exec the following sql in TD SQL Assist the rec are getting inserted successfully. But I try to exec the sql through the shell script I am getting the err "Failure 6760 Invalid timestamp.  Statement# 1, Info =0"

58 views
1 reply, 1 day ago
Dynamic partition elimination Topic by spkother 12 Sep 2014

Hi,
 
  I am new to teradata.what is dynamic partitioning elimination when it is comes under picture.please clarify

513 views
3 replies, 1 day ago
How to resolve error 7454 when casting timestamp(6) to time(0) Topic by MBushnell 2 days ago

I am trying to get the time 'HH:MM:SS' from a timestamp column.
This works but the result is 'HH:MM:SS.ssssss'
SELECT CAST(CURRENT_TIMESTAMP AS TIME);
Tried this and got error 7454 DateTime field overflow
SELECT CAST(CURRENT_TIMESTAMP AS TIME(0));
Is there a way to cast timestamp to time(0) without casting to a char string first?

51 views
1 reply, 1 day ago
wrong timestamp displayed Topic by kmanivan82 2 days ago

select timestamp format

Hi Team,
what is wrong in the following SQL.
 

94 views
2 replies, 2 days ago
Change based threshold option for collect stats Topic by Moutusi 2 weeks ago collect statistics

Hi,
I need to delete and reload a large table every day. Though there may not be huge change on the data. If I use below statement will it work? My understancding is collecting unnecessary stats can degrade overall performance. I don't wnat to collect stats if there is not more than 10% change in data.
COLLECT STATISTICS USING THRESHOLD 10 PERCENT

221 views
2 replies, 2 days ago
Overlapping dates Topic by odivini 4 days ago

Hello, I need help with overlapping dates. I have two tables, one with promotion and second with service plan. I need to pull service plan for corresponding promotion. My SQL pulls incorrect plan. Please let me know if you have suggestions on how to solve overlapping dates problem. Thanks a lot.
table 1
line_id promotion_cd start_dt end_dt

99 views
2 replies, 2 days ago
Get record count from cursor Topic by jnevill 2 days ago

Is it possible, upon opening a cursor, to get a record count from the cursor? I have an SP where I open 8 cursors to be returned to the caller. I collect some stats about the time it takes to run, the SP invoker, and whatnot. It would be nice to also include a record count in there too.

35 views
0 replies
How to get the user information. Topic by SriniD 2 days ago

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.

46 views
0 replies
Query To Locate Populated Columns Topic by newton1965 2 days ago

Is there a way to query which columns of any given table throughout an entire database that is populated with (non-null) data?
Thanks

40 views
0 replies
How to read Journal Table in teradata ? Topic by muthu1802 2 days ago journal table, Permanent Journal

Are the journal table data's are readable ? If yes , can we select it using simple SQL (select *) ?
or How to read Journal Table data ?
please suggest.
Thanks,
Muthu.
 
 

57 views
0 replies
Backup Topic by raddatz.dennis@gmail.com 1 month 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?

298 views
3 replies, 2 days ago
3706 syntax error Topic by kmanivan82 3 days ago

Hi Team,
when i run the following sql in Teradata SQL Assist, the sql execution is successful. but when i run the following SQL through script, the error message " *** Failure 3706 Syntax error: expected something between the word 'SCAN_RE

 QUEST_TS' and ','.

 
" is thrown.

99 views
2 replies, 2 days ago
Converting CET TO PST timestamp Topic by BalaChuppala 3 days ago teradata, CET, PST, conversion

Hello Experts
I have a requirement to convert oracle date field, that YYYY-MM-DD HH:MM:SS , which is in CET TIME ZONE data.
This data to be  converted  to PST  Timezone in Teradata by considering the Daylight Saving Timings in mind.
Is there any  easier and more effecient way to tackle this issue.
Thanks

58 views
0 replies
Trying to create a data lineage from a stored procedure Topic by RMaiti 3 days ago Teradata stored procedure data lineage

Hi experts, I have a requirement like creating a data lineage report (at column level) for a bunch of stored procedures. Condition is not to use any third party tools. Is there any Teradata tools which can help us in preparing this ? Expected input : stored proc name / definition , output : which target table/report column is sourced from which column in which table/view?

70 views
0 replies
Difference Between Restore Job and Copy Job Topic by usmans 02 Feb 2013 restore job, copy job

Hi,
I am not sure if this is the right place to post my question.
Anyway, I am new to Teradata. I use NetVault to restore and backup the data onto tapes.
Now my question is: How can I be dead sure that when I have to make a Restore Job and when I have to make a Copy Job?
What is the difference between the 2?

2700 views
6 replies, 3 days ago
Insert from WITH variation of Derived Table Topic by astocks 3 days ago #sql, #derived table, #with statement, #insert

I'm trying to INSERT INTO a table or CREATE TABLE AS from a SQL statement using the WITH form of a derived table.  Is this possible?

53 views
0 replies
Bulk Insert In Teradata taking alot of time(Using Jdbc driver terajdbc 14.00.00.41) Topic by geetikak 3 days ago Bulk Insert, jdbc driver

Hi All,
I am trying to perform bulk insert operation on teradata database in java. But It taking lot of time. I am doing this insertion in batches. I have explore the FASTLOAD Parmeter also. But it is for laoding huge amount of data or to perform insertion in EMPTY TABLE.
I want to peform bulk insert in existing Table.

80 views
1 reply, 3 days ago
Creating and populating a parameterized table inside a stored procedure Topic by Ionescu Logic 1 week ago create, table, procedure

I am trying to create a table and populate it inside a stored procedure but I get E(3807): table does not exist.
I used the following query:
 create procedure stp_agg (in par1 varchar (20),in par2 int)
begin
    create table tbl_spt
    as
    (select subscriber_id from existing_tbl) with no data;
    insert into tbl_spt (subscriber_id)

146 views
2 replies, 3 days ago
DBA-Tools Topic by Nileshhmali 3 days ago

I am new to teradata,i have worked on DBA-Tools,
Any one Explain the,DBA-Tools:1)Instance manager(Which system tables are use)
                                                    2)Storage manager(Which system tables are use)
                                                     3)Session Manager(Which system tables are use)

62 views
0 replies
TPT usage with informatica Topic by bhartiya007 1 month ago tpt

Hi All,
I have some questions on TPT usage with Informatica. We have some tables( with billion records) in oracle  and we have to load it to non empty Teradata table in a parallel mode.
My manager suggested to use TPT. Will that be advantageous? What will be the benefits of using TPT instead of traditional Mload.
Plz suggest some insights into it.
Thanks.

221 views
1 reply, 3 days ago
select timestamp format Topic by kmanivan82 4 days ago

Hi Team,
what is wrong in the following SQL.
SELECT TO_TIMESTAMP ('03/26/2015 04:00:32', 'MM/dd/YYYY hh:MI:SS');
 
it returns
"3/26/2015 10:00:32.000000"
 
instead of 04:00:32 it returns 10:00:32. how to fix this issue?
 
Thanks
Krishna

86 views
0 replies
Partition clause with Reset option Topic by immadinsr 4 days ago partiton by, reset

Hello all,
This is my first post in the forum and please excuse me if i am off the hook with my post.
I am writing a sql logic and i am stuck at a point where i am not sure how to proceed.  I am hereby giving some synopsis about the issue and i will really appreciate if you can guide me how to proceed to the resolution.

100 views
1 reply, 4 days ago
Help needed in selecting customers based on the property visiting dates and aggregating them into property level Topic by akt 4 days ago #database #teradata #TTU #SQLAssistant, #sql

Hi,
I have customers transaction table visiting certain properties over several years. The dataset contains customerid, property_name, visited_date and has over 50million records.
I would like to aggregate the customer information into properties related as shown below
               property1_column   property2_column   property3_column  

53 views
0 replies

Pages