#DateForumTypeThreadPost
392812 Aug 2015 @ 09:55 PDTDatabaseReplyInsertion error - Stored ProcedureWhy do you post questions related to mysql on a Teradata site? Nevertheless this is not going to work in any DBMS, a CONTINUE handler continues with the next statement, but doesn't repeat the ...
392712 Aug 2015 @ 09:50 PDTGeneralReplyGet Minimum Price from Overlapping valid dates Now it's much more complicated :-) Similar questions have been asked multiple times, you need nested OLAP functions to get that result: SELECT * FROM ( SELECT prod_id, vld_fr_dt, pri...
392612 Aug 2015 @ 07:10 PDTDatabaseReplyDecode non-displayed char non-spacesHASH_MD5 is a C-function and C treats a binary zero as string terminator. You should fix the current data and the apply oTranslate during load.
392512 Aug 2015 @ 04:36 PDTDatabaseReplystacking two tablesSimply add a CAST(NULL AS ...) using a matching datatype in the 2nd SELECT.
392412 Aug 2015 @ 02:52 PDTGeneralReplyGet Minimum Price from Overlapping valid dates For your example this should be a simple: SELECT prod_id, price, vld_fr_dt FROM tab QUALIFY ROW_NUMBER() OVER (PARTITION BY prod_id, vld_to_dt ORDER BY price) = 1 &nbs...
392312 Aug 2015 @ 02:46 PDTDatabaseReplystacking two tablesWhat do you mean by stack, probably a UNION ALL? The first SELECT of a UNION determines the column names and datatypes, you can CAST a column to match the datatype of the 2nd table.   ALTER...
392212 Aug 2015 @ 02:43 PDTDatabaseReplyGrouping set of values into multiple groupsI don't fully understand what you're trying to do. Seems like a GROUP_CONCAT aggregate, see http://forums.teradata.com/forum/database/convert-a-column-into-a-comma-separated-list-0#commen...
392112 Aug 2015 @ 02:41 PDTDatabaseReplyDecode non-displayed char non-spacesYou already found the bad value, '00' :-)   See http://forums.teradata.com/forum/database/comparing-2-different-datatypes-giving-undesired-results#comment-141218
392012 Aug 2015 @ 02:34 PDTDatabaseReplyTricky stats collection Hi Mike, of course you can collect 100 stats on a single table if you actually need them, but afaik there's a limit of 32 multicolumn stats on a single table. Do you really need both columns,...
391911 Aug 2015 @ 01:48 PDTDatabaseReplyString limit for checksum calculation using HASH_MD5 functionWhat's the definition for the maximum length of your input string? In the MD5 UDF found in the download area it's only 32000 Latin characters.  If the concatenated string exceeds that...
391811 Aug 2015 @ 02:11 PDTDatabaseReplyspool space errorHi Grigore, when your final result is only 31655 rows there must be some intermediate steps running out of spool. If Explain looks ok (no product join with a stupid condition?) you need the data ...
391710 Aug 2015 @ 04:25 PDTGeneralReplySelect is getting failed with error "SELECT Failed 3610"There might be different patch levels in dev and prod. If dev has a higher patch this issue might been fixed already and you just need to upgrade prod, too. Otherwise open an incident with Teradat...
391610 Aug 2015 @ 04:21 PDTDatabaseReplyHash IndexOf course you can define an ordered Primary Index on a Join Index, simply use ORDER BY in the SELECT.
391510 Aug 2015 @ 04:15 PDTDatabaseReplyspool space errorHi Grigore, first you need to find out which step runs out of spool, check dbc.QryLogStepsV for that query. Compare to Explain to see if the estimated numbers match the actual from the steps. &n...
391410 Aug 2015 @ 03:59 PDTDatabaseReplyAggregation step taking time Teradata Explain Plan In some cases it might be more efficient to materialize the result of the query without the GROUP BY first as a MultiSet Volatile Table with a Primary Index on the GROUP BY columns. Then do the agg...
391306 Aug 2015 @ 02:52 PDTDatabaseReplyTable occupying space without any rowsThis might be due to an active Online Archive on that table, check using dbc.ArchiveLoggingObjsV. Either run an ArcMain job with LOGGING ONLINE ARCHIVE OFF. Or drop & recreate the table. And...
391205 Aug 2015 @ 01:49 PDTDatabaseReplyutf8TO16 : why is it Latin to unicode conversion function when utf8 itself is unicode encoding?If that column contains any non-Latin characters TRANSLATE will fail, you might add WITH ERROR to replace bad chars with an error character (hex '1A'): TRANSLATE(COL1 USING UNICODE_TO_LA...
391105 Aug 2015 @ 01:28 PDTDatabaseReplyVolatile Tables in MacrosMS SQL Server doesn't have Macros and the same for Oracle :) If you want to create a Volatile Table and use it simply switch to a Stored Procedure instead. Why updating very old syntax (Macro...
391005 Aug 2015 @ 01:18 PDTDatabaseReplyAggregation step taking time Teradata Explain Plan If there's no GROUP BY in your SELECT it's probably a DISTINCT rewritten by the optimier as an aggragtion. If the estimated numbers are correct, this step might run for a long time, did yo...
390905 Aug 2015 @ 01:10 PDTPrivate Forum
390805 Aug 2015 @ 10:47 PDTPrivate Forum
390705 Aug 2015 @ 05:17 PDTDatabaseReplyParsing CompressValueList column from DBC.ColumnsSHOW TABLE returns correct data, so at least it's compressing the correct values :) I don't think there's a workaround, so you might open an incident to get this fixed...
390605 Aug 2015 @ 05:11 PDTDatabaseReplyImpact of unnecessary compress on all char and varchar columns.Hi Carlos, of course you're correct, DefaultCaseSpec also controls the default for new columns (I was under the impression this is only for comparisons, my fault).
390505 Aug 2015 @ 04:20 PDTDatabaseReplyImpact of unnecessary compress on all char and varchar columns.Adding to #3: DefaultCaseSpec is only for string comparisons in Teradata mode sessions, but the default for a new column is based on the session mode,always NOT CASESPECIFIC in a Teradata ses...
390405 Aug 2015 @ 04:13 PDTDatabaseReplyMonitor Index CreationHi Arpit, afaik there's no direct way. If you query the current size of the table using dbc.TableSizeV before running the create index and calculate the expected size of that index you c...

Pages