#DateForumTypeThreadPost
387828 Jul 2015 @ 09:23 PDTTeradata ApplicationsReplyExplain PlanIt's the actual plan. The actual resource usage (CPU/IO/etc.) can be found in the dbc.QryLogSTepsV.
387728 Jul 2015 @ 09:21 PDTGeneralReplyHow to update a datatype of a column in a table having huge dataYou should check first if it's allowed (see DDL manual) to change the datatype using Alter Table. If it's actually allowed it might be possible without modification of the data (e.g. incre...
387628 Jul 2015 @ 09:15 PDTDatabaseReplyTeradata Open Query syntaxOPENQUERY is MS SQL Server syntax, which is not supported in Teradata.
387528 Jul 2015 @ 09:13 PDTDatabaseReplyTop percentage group of items, by variablePERCENT_RANK will not work in your case, it returns a ranking based on the amount, but you need it based on the sum of the amounts, a Cumulative Sum: qualify sum(ITEM_AMT) OVER (PARTIT...
387428 Jul 2015 @ 09:06 PDTDatabaseReplyInvalid defaulted table ?Yep, it's known :-) http://forums.teradata.com/forum/database/table-aliasing#comment-142030
387327 Jul 2015 @ 12:25 PDTDatabaseReplyFinding and Flagging a record with Non-Latin CharactersHow do you define "non-Latin", a character not from the LATIN charset?  TRANSLATE_CHK(col USING UNICODE_TO_LATIN) returns the position of the 1st non-Latin character (or zero). Oth...
387227 Jul 2015 @ 10:09 PDTDatabaseReplyTop percentage group of items, by variableI don't get what you actually want, can you show some example data? TOP PERCENT is usually replaced by PERCENT_RANK...  
387127 Jul 2015 @ 10:04 PDTDatabaseReplyPerformance TuningNOT IN might result in a overly complicated plan, but never when using NOT EXISTS.  Of course joining partitioned to non-partitioned tables on their PI is slower than joining tables with same...
387026 Jul 2015 @ 04:04 PDTDatabaseReplyPerformance TuningIN will be rewritten to a JOIN anyway and the optimizer decides if/what/when to sort.   But before you try to change your approach you should find out why/which step is performing bad. ...
386925 Jul 2015 @ 04:23 PDTDatabaseReplyPerformance improvementCan you show those existing indexes & partitioning? And the MERGE plus explain?
386825 Jul 2015 @ 04:20 PDTDatabaseReplyPerformance TuningYou don't have any matching PIs and estimated time is close to actual. Check QryLogStepsV for the actual vs. estimated numbers and skew.
386725 Jul 2015 @ 01:50 PDTDatabaseReplyNeed this tricky logic .. Urgent helpWhat's your Teradata release? In TD14.10 there's LAST_VALUE: SELECT id, LAST_VALUE(name ignore NULLS) OVER (PARTITION BY id ORDER BY datecol DESC) AS name, L...
386625 Jul 2015 @ 01:38 PDTData ModelingReplyGenerate a database ddl in Teradata v14I can't help you with your ERwin issue, but you can get all DDLs without too much cut'n'paste :-)   Open Tools -> Options -> Export and set: Write all exported answer...
386525 Jul 2015 @ 01:03 PDTDatabaseReplyPerformance Tuning#1: Change the NOT IN to a NOT EXISTS: and NOT EXISTS ( select * from xer.xerox_loaded_usg AS u where src_system in ...
386424 Jul 2015 @ 07:18 PDTDatabaseReply2620: The format or data contains a bad characterRemove the CAST and check the data returned by the regex. Your data type allows xxxxxxxx.xx, but your FORMAT only xxxx.xx. 
386324 Jul 2015 @ 07:13 PDTDatabaseReplyMaximum page number while exporting data using bteqIf the Page parameter is actually limited to 99999, you might increase the PageLenght instead :-)  
386224 Jul 2015 @ 07:10 PDTDatabaseReplyFind the list of active running queries through SQLThe syslib.MonitorSession uses the PMon API, too. SELECT * FROM TABLE (MonitorSession(-1,'*',0)) dt;  
386123 Jul 2015 @ 10:41 PDTDatabaseReplyMaximum page number while exporting data using bteqWhy do you want to export data like this? Trying to print 2 million pages? :-)
386023 Jul 2015 @ 10:36 PDTDatabaseReplyplease help on this scenarios? SELECT SPCL_TYP_C AS SPCL_TYPE_CODE, 'Y' AS PRE_IND_CD FROM SPCL_TYP WHERE SPCL_TYP_C IS NOT NULL UNION ALL SELECT SUB_SPCL_TYPE1, 'N' FROM SPCL_TYP WHERE SUB_SPCL_TYPE1 IS ...
385923 Jul 2015 @ 10:06 PDTGeneralReplyQuerying the data between 2014 and current datewhere the_date between DATE '2013-12-31' and current_DATE
385823 Jul 2015 @ 10:05 PDTDatabaseReplyVariable length substring with multiple delimitersHi Nik, in TD14 you can also use a Regular Expression: REGEXP_SUBSTR(col, '[0-9]+')
385722 Jul 2015 @ 02:56 PDTDatabaseReplyFill up data from latest previous data untill it changesWhat's your TD release? TD14.10 supports LAST_VALUE(C1 IGNORE NULLS) OVER (PARTITION BY RESID ORDER BY DT)
385622 Jul 2015 @ 02:55 PDTDatabaseReplyNeed help with nested cursorsI don't think there's any vaild reason to nest cursors, can you elaborate why you need it?
385522 Jul 2015 @ 02:53 PDTToolsReplyBteq Sort Vs SQL AssisstantThis is probably due to different collations, Mainframe might use EBCDIC. Check the collation returned by HELP SESSION; in BTEQ and use this instead, e.g. SET SESSION COLLATION ASCII;
385422 Jul 2015 @ 02:48 PDTDatabaseReplyhelp needed in a regular expressionTo extract the numeric part you can use this regex: regexp_substr(site_data_text, '([0-9x]+)')  

Pages