#DateForumTypeThreadPost
447827 May 2016 @ 02:09 PDTDatabaseReplyTERADATA on Windows 10Tu dois installer VMWare Workstation et puis télécharger une version de Teradata Express. Il y a un user guide, en anglais :)
447727 May 2016 @ 01:48 PDTDatabaseReplyMerging 2 rows into one single rowThere's no LAG/LEAD in Teradata, you must rewrite it. And you don't need a CTE, there's QUALIFY: select DATE, Service, CURR_MONTH, CURR_EOP_CNTS, MIN(CURR_MONTH) OVER...
447627 May 2016 @ 01:39 PDTToolsReplywhich Teradata Utility is best for deleting records from Big table (2 TB Table)What's the percentage of deleted rows? Best is probably a plain SQL DELETE.
447526 May 2016 @ 10:18 PDTDatabaseReplyPartition by Range_NYou can't be sure that no hashes overlap but a high number of x (e.g. 65535) will reduce the risk. If it's Latin only you could also do two-levels using character partitioning for each cha...
447426 May 2016 @ 10:10 PDTGeneralReplyTeradata Driver 15 Issue in Microsoft AccessCan you show your actual query? Your Select is the same as SELECT DISTINCT Field1 From T1 And what do you mean by issue, error message, wrong result?  
447326 May 2016 @ 10:07 PDTAnalyticsReplyTranspose rows to columnsSince TD14.10 there's a TD_UNPIVOT function: http://www.info.teradata.com/HTMLPubs/DB_TTU_14_10/SQL_Reference/B035_1145_112A/Table_Operators.098.21.html
447226 May 2016 @ 10:02 PDTDatabaseReplyLeft join and filter NULL doesnt work!Your query should work as expected. But if you want to remove NULLs in table2, why don't you use an Inner Join instead?
447125 May 2016 @ 04:59 PDTDatabaseReplyWant to know the difference between the working of teradata statementsWhatever you need to get the expected result :) MONTHS_BETWEEN returns a result including a fraction. Your calculation is inefficient because you cast to a string and then back to an int, better u...
447025 May 2016 @ 02:29 PDTDatabaseReplyCopying trillions of data to new tableOf course there's an obvious question: WHY do you need to copy trillions of rows?
446925 May 2016 @ 02:22 PDTToolsReplyCalculate each hour from a monthYou can easily create all hours of a month using EXPAND ON, and then it's a Left Join using CONTAINS: SELECT BEGIN(pd), COUNT(*) FROM ( SELECT pd FROM sys_calendar.CALENDAR WH...
446825 May 2016 @ 02:05 PDTGeneralReplyDate Conversion Issue, from String to DATEYou either got bad data or the format doesn't match. Can you show some strings?  
446725 May 2016 @ 02:03 PDTDatabaseReplyCopying trillions of data to new tableReally trillions? There are not many customers with that large amount of data in a single table.   The fastest way will utilize a FastPath Insert/Select: Target table is empty and has exact...
446625 May 2016 @ 01:58 PDTGeneralReplyImporting from Excel in SQL Assist giving "Wrong number of data values in record 1."Is there a header row in the file? Check Tools -> Options -> Import -> Ignore the first recordin the input file (Skip Header) Or is the delimiter also found within the data?
446525 May 2016 @ 01:56 PDTDatabaseReplyWith recursive in a SelectWell, you can do it, remove the 2nd WITH and change the order of CTEs: WITH RECURSIVE rec_test (question,element,LVL) AS ( SELECT question_id,cast(element_id as varchar(1000)), 1 ...
446424 May 2016 @ 04:38 PDTDatabaseReplyPrimary key and Primary index on a same columnThis seems to be a bug, a USI on top of a NUPI in this case is totally stupid. The only case where this might be useful is a partitioned table where the partitioning column is not part of the PI (...
446323 May 2016 @ 05:24 PDTDatabaseReplyTIPS TO CONVERT DECIMAL TO VARCHARNow it's getting ugly :) oREPLACE is a UDF and return a VARCHAR(8000), you can either add another CAST: CAST(oTranslate(trim(col7 (format '-(12)9.99')),'.',',') AS V...
446223 May 2016 @ 03:01 PDTDatabaseReplyto divide the data usinng modulusWell, the issue is a bad character :-)   You simply got some non-digits in acct_no. Switch to TO_NUMBER instead: WHERE TO_NUMBER(acct_no) MOD 2 = 0   You can also use it to find the ...
446123 May 2016 @ 02:56 PDTDatabaseReplyTIPS TO CONVERT DECIMAL TO VARCHARYou need to double each single quote because the APPLY statement is s string: 'SELECT cast(substr(col1,1,9) as varchar(9)), col2, col3, col4, col5, col6, trim(col7 (format ''-(10)9...
446020 May 2016 @ 03:36 PDTDatabaseReplyWhen you give a calculated column the same alias as an existing column, how do you refer to the new value? the newly calculated value MUST have the same name as the underlying column Why do you think this is necessary? WITH RECURSIVE THING (X,NEG_X) AS ( SELECT X, -X AS NEG_X ...
445920 May 2016 @ 01:18 PDTDatabaseReplyMacro performance issueLet me guess: The DELETE is a DELETE ALL and the INSERTs are INSERT/SELECTs. When you run them individually you get #1: a FastPath DELETE (no Transient Journal) #2: a FastPath INS/SEL (no TJ) ...
445820 May 2016 @ 01:05 PDTDatabaseReplyUDFCONCATI just can repeat: There's no way to rearrange the data returned by udfconcat efficiently. Your options are: If the number of rows per value is known and limited, old style MAX(CASE) i...
445720 May 2016 @ 10:00 PDTGeneralReplyRunning Sum counter restart when threshold value reachedYou have to use recursion for this task, OLAP functions don't work here. First you need a way to advance to the next row, so create a Volatile Table with a ROW_NUMBER() with the same PARTITON/...
445620 May 2016 @ 09:41 PDTDatabaseReplyHelp tables shows truncated column namesThere's no V-version of HELP, but when you scroll to the right there are some new columns, "Column SQL Name" with the full 128 Unicode characters. I needed a few years to find this a...
445520 May 2016 @ 09:33 PDTDatabaseReplyUDFCONCATHi Suhail, There's no way to rearrange the data returned by udfconcat efficiently, you might write your own UDF (or do an Enhancement Request to add a LISTAGG/GROUP_CONCAT function). tdstats....
445420 May 2016 @ 07:40 PDTDatabaseReplyColumn value is refered as Column_Name in another tableWhen you run out of spool it's probably not because of the huge CASE. I assume your actual query is more complicated, did you check Explain?

Pages