#DateForumTypeThreadPost
33725 Jun 2016 @ 04:42 PDTDatabaseReplyHow to insert recursive query answerset to another tableAll the columns selected at the end of recursive query are inserted in the table. If you want to insert some specific columns then select only those ones.
33625 Jun 2014 @ 11:27 PDTGeneralReplyI have alpanumeric,character and interger values in my column,by using case i want to char values as 'C',int values as 'I'.Which database version you are using? Did you try using regular expressions?
33509 May 2014 @ 07:00 PDTAnalyticsReply3706: Syntax error: expected something between ')' and ','. For derived SELECT * FROM TBL WHERE LOCATION = 'BAN' UNION ALL SELECT * FROM TBL WHERE LOCATION <> 'BAN' ORDER BY LOCATION ASC    
33409 May 2014 @ 06:56 PDTDatabaseReplyRecommendation on varhar - char columnsThanks for the correction David. Yes I meant rows having 2 extra bytes in case of varchar :)
33308 May 2014 @ 04:49 PDTDatabaseReplyRecommendation on varhar - char columnsI think the important factor would be how much variance you are expecting in that specific data field. VARCHARs takes 2 extra bytes in the table header, so if you are expecitng the data to be of va...
33208 May 2014 @ 04:35 PDTDatabaseReplyLock row for access : In insert-SelectThe insert statement will overwride the access lock with write lock. Review the explain plan and you will notice it.
33108 May 2014 @ 04:33 PDTDatabaseReplySkew, amp and column selectionNo the order in the PI definition doesn't change the data distribution scheme. Data will land on the same AMP whether you select (col1, col2) or (col2, col1) as the PI. You can use the HASHAM...
33002 May 2014 @ 07:17 PDTDatabaseReplyRECURSIVE VIEWThis should help. http://www.info.teradata.com/HTMLPubs/DB_TTU_14_00/index.html#page/SQL_Reference/B035_1184_111A/Create_Procedure-Details.011.105.html
32902 May 2014 @ 07:14 PDTDatabaseReplyRecursive Query IssueI have written something very quickly but haven't tested it. Probably some minor tweaks would do the trick. CREATE SET TABLE foo ( Number_id integer, FF_String VARCHAR(100), STRGY_TC VARC...
32802 May 2014 @ 06:55 PDTPrivate Forum
32702 May 2014 @ 06:51 PDTDatabaseReplyTranspose and Concatenating ValuesYou need to write the recursive query. I haven't tested this SQL, but I hope it will work for you WITH RECURSIVE LOOKUP(ID,VALUE,LVL) AS ( SELECT ID, MIN(VALUE(VARCHAR(1000))) AS VALUE,...
32602 May 2014 @ 06:41 PDTDatabaseReplyRecursive Query Issue See my other post, I have provided the solution for a similar problem.   http://forums.teradata.com/forum/database/help-in-recursive-query-required     or ther...
32501 May 2014 @ 12:25 PDTDatabaseReplySELECT Failed 2665: Invalid DateI guess there is a UDF ISDATE(), which returns the valid date or null if it is invalid. You can use that to test the data in datecolumn you are working with.
32401 May 2014 @ 12:21 PDTDatabaseReplyRecursive Query IssueDid you try writing a SQL? Please share and let us know where you are stuck and someone can guide you in right direction.
32316 Apr 2014 @ 02:58 PDTDatabaseReplyOptimizer confidence level and understanding explain planIf the joining is based on the PI and the stats are refreshed like you said, then the query on PI column join should give the explain plan with high confidence as both the joining rows would be on ...
32215 Apr 2014 @ 12:53 PDTDatabaseReplyPartition Primary IndexCouple of things I would add, Adding the PPI doesn't guarantee the improvement in execution time until and unless they are being used properly in most of the queries. So basically you need to a...
32115 Apr 2014 @ 12:48 PDTDatabaseReplyFallback technique in TeradataYou can make the tables fallback using ALTER table statement, and can take a lot of time depending on the records in the tables as the opertaion is a full-table scan. The system reads all the rows ...
32015 Apr 2014 @ 12:29 PDTDatabaseReplySkew FactorRead the above post by ulrich. In short yes, if you want to reduce the skeweness you need to check which columns or combination of columns provide better distribution.
31910 Apr 2014 @ 10:14 PDTDatabaseReplyReference material to get started with teradataYou need to visit www.info.teradata.com and there will be good enough resources available there. The following pdf http://www.info.teradata.com/do_redirect.cfm?itemid=081840002 should give yo...
31810 Apr 2014 @ 09:57 PDTDatabaseReplyConversion of Oracle's CONNECT BY...STARTING WITH to TeradataYou can use RECURSIVE queries to get this sort of result.
31710 Apr 2014 @ 01:31 PDTAnalyticsReplyExit handling routineYou should be able to do that in UNIX script. Fetch the DDL from dbc tables and export them in some text file and then do the text parsing and take the actions accordingly.
31610 Apr 2014 @ 01:21 PDTDatabaseReplyRounding Number SEL CASE WHEN COL1 - CAST (COL1 AS DECIMAL(10,0)) = 0 THEN COL1 ELSE CAST(COL1 AS DECIMAL(10,0)) + 1 END You are right, the CEIL and FLOOR functions are available in TD 14.
31510 Apr 2014 @ 12:56 PDTDatabaseReplyInsert not workingThe syntax is not right. You can't define the alias for the target table mentioned in INSERT statement. On top of that you can't reference the target table (XX in your case) in SELECT clau...
31409 Apr 2014 @ 05:41 PDTDatabaseReplyRowID issue with teradataIn Teradata, there is ROW_NUMBER function which you can use. Following is the syntax for ROW_NUMBER ROW_NUMBER() OVER(PARTITION BY <<col_list>> ORDER BY <<col_list>> Becas...
31309 Apr 2014 @ 05:34 PDTDatabaseReplyRowID issue with teradataFrom which DBMS you want this query to be migrated to Teradata? We will need more information like what error you are getting, and on which particular clause you are getting the error and needs a ...

Pages