#DateForumTypeThreadPost
382809 Jul 2015 @ 06:54 PDTGeneralReplyStored procedure - Facing error while executing Call statementHi Mohammad, you need to fix the source code before you can call this procedure :-) As I already wrote: your SET statement results in an invalid CREATE TABLE statement in SqlTxt.
382709 Jul 2015 @ 06:12 PDTDatabaseReplyNeed Help Update the interval using recursive or by any to make start date and end date in squenceHi Vinoth, you simply need to find then next row's from_date and subtract one day from it: select from_date, to_date, max(from_date) over (order by from_date, to_date row...
382609 Jul 2015 @ 04:01 PDTGeneralReplyStored procedure - Facing error while executing Call statementYou need to add some spaces, currently you try to execute this CREATE TABLEdb.tb_bkpASdb.tbWITH DATA and STATS  
382507 Jul 2015 @ 11:53 PDTDatabaseReplyCumulative data difference between rowsBut why is the 2nd DIFF -32 instead of 32? FROM_DT - max(THRU_DT) over (partition by ID order by FROM_DT, THRU_DT rows between 1 preceding and 1 preceding)  
382407 Jul 2015 @ 11:32 PDTAnalyticsReplyLoss of Precision in LEAST() FunctionHi Stephen, what's your Teradata release and the actual datatypes?
382307 Jul 2015 @ 02:18 PDTViewpointReplyVery long running queries impacting performance due to frequent re-classificationRegarding the queries with OLAP functions, the classification might be due to the missing estimates for "Stat Function" steps (TD15 adds this). How's the SHORT workload actually defin...
382206 Jul 2015 @ 09:22 PDTDatabaseReplyCreate tables for loading changing filesHi Prasanth, if it's a onetime load you can load the files one after the other using Studio. Open the "Data Transfer" perspective and navigate to your target database, right click o...
382106 Jul 2015 @ 09:04 PDTTeradata StudioReplyTeradata Studio query returned 0 rows but SQLA returned 1,027 rows...identical query.There's probably a simple solution. Are there any string comparisons in your query? Your system probably defaults to Teradata session mode (BEGIN/END TRANSACTION or BT/ET), but Studio uses AN...
382006 Jul 2015 @ 01:00 PDTDatabaseReplyOne string out of the repetitive string seriesHi Nagendra, try a regular expression: REGEXP_SUBSTR( x,'\b(\w+)(?=\W\1\b)') \b -> word boundary (\w+) finds a group of letters, digits and underscores = the searched word (?=\W\1...
381905 Jul 2015 @ 11:19 PDTDatabaseReplyGet the previous row's column ValueThis syntax is the same since V2R4. Double check if you did somethng else wrong.
381805 Jul 2015 @ 11:17 PDTToolsReplyReceiving Failure 2673 The source parcel length does not match data that was defined while importing using BTEQ Sure i will go with new thread for new question. I actually didn't notice that this is a new topic. Does sdlc changes when you use teradata instead of oracle ? Probably not.
381705 Jul 2015 @ 01:35 PDTDatabaseReplyHow to limit rows to only those where there are duplicates of a specific column?Is the rank actually gapless? Created by a ROW_NUMBER? SELECT Rank, Type FROM tab QUALIFY Rank = MAX(CASE WHEN Type = 'U' THEN Rank END) OVER () - 1 OR Rank = MAX(CASE WHEN Type ...
381601 Jul 2015 @ 11:36 PDTDatabaseReplyError: Invalid operation for DateTime or Interval Everything is the exact same between the tables The order of columns is different and you're doing a "SELECT *". Simply switch to the correct column list: INSERT INTO Measur...
381530 Jun 2015 @ 11:23 PDTAnalyticsReply"Query is Invalid"errorThere's no VIEW command, just HELP or SHOW: HELP TABLE myTable; returns column descriptions   SHOW TABLE myTable; returns the table's CREATE statement
381430 Jun 2015 @ 11:21 PDTToolsReplyReceiving Failure 2673 The source parcel length does not match data that was defined while importing using BTEQHi Mallik, please post a new question in a new thread. Q1: The control statements within an SP (LOOP, IF, etc.) run on a single node, but the queries run exactly the same as standalone SQL. &nbs...
381330 Jun 2015 @ 09:44 PDTDatabaseReplyHow to use dervied table in another derived table using with cluase in SQL?It's not your fault, it's Teradata's implementation of WITH which is simply not correct, see: Using WITH Statement Modifier instead of Temp Tables?  
381230 Jun 2015 @ 09:38 PDTDatabaseReplyReplace NULL Values in Table with Most Recent NOT NULL valuesYou need to put tabular data as a "code snippet". Regarding your question, this has been asked several times during the last day :-) Problem with history table Compare current row with...
381130 Jun 2015 @ 09:24 PDTToolsReplyBTEQ Import/Export of decimals does not workFor your import you define DEC_VALUE as DECIMAL which defaults to DECIMAL(5,0). Change to DECIMAL(22,8).
381029 Jun 2015 @ 10:07 PDTDatabaseReplyGlobal Tempoary Table ErrorIs your role active? SELECT * FROM dbc.UserRoleRightsV;   Enable for the current session: SET ROLE myRole; or permanently: MODIFY USER myUser AS DEFAULT ROLE = myRole;   Instead o...
380929 Jun 2015 @ 12:49 PDTDatabaseReplyNeed clarification in date type conversionDATE '2015-06-03' is not converting a string to a date, it's a Standard SQL's date literal :-) To convert a string to a date you must use Standard SQL CAST(dt AS DATE) or old-...
380829 Jun 2015 @ 12:46 PDTDatabaseReplyOptimizing Stats CollectionThe biased number don't imply it's a really big table, so I assume that "5-6 hours" is for recollecting all stats on that table. You should check if you can use SAMPLE STATS inst...
380729 Jun 2015 @ 12:32 PDTDatabaseReplyTable AliasingHi Moutusi, that's definitely false. There's one specific case where wrong aliases might result in an unwanted cross join (= huge spool): SELECT table1.col1, -- wrong name, should be t...
380628 Jun 2015 @ 11:41 PDTDatabaseReplySplit The Column which is delimited into separate Rows What's your Teradata release? Are XML services available? SELECT * FROM dbc.FunctionsV WHERE FunctionName = 'XMLAGG';   SELECT Column_A, TRIM(TRAILING...
380528 Jun 2015 @ 11:36 PDTDatabaseReplyProblem with history tableHi Sitara, there's no other way to get this result, that's why there's FIRST_VALUE/LAST_VALUE. Btw, TD13 is out of maintenance for a while, are you sure there's no planned upgrade?
380428 Jun 2015 @ 02:32 PDTDatabaseReplyProblem with history tableThere's RESET WHEN, but this is way less performant: MIN(colums_s) OVER (PARTITION BY key_ ORDER BY ts RESET WHEN colums_s IS NOT NULL)  

Pages