#DateForumTypeThreadPost
430330 Mar 2016 @ 09:56 PDTUDAReplyconvert varchar to timestampThere was a similar thread a few weeks ago: http://forums.teradata.com/forum/database/converting-string-to-date-using-regexp-getting-error-3798
430229 Mar 2016 @ 05:14 PDTDatabaseReplyPerformance of the We do a MERGE into table HUB_ENCOUNTER_MESSAGE from Spool 18767. step of an insertIn DBQL there's no TJ/Fastpath info. Of course in that special case a debugger wouldn't help much, I was just nagging, waiting for a SP debugger since V2R3 :)
430129 Mar 2016 @ 03:14 PDTDatabaseReplyHierarchy buildingHi Chandan, you need a Recursive query, see  http://forums.teradata.com/forum/database/finding-links-between-two-col-values#comment-130388
430029 Mar 2016 @ 03:09 PDTDatabaseReplySQL QUERY that stops the process once match is found.Hi Vidya, you can move the calculation into a Derived Table: SELECT --no more DISTINCT A.Name,A.ID, coalesce(b.SVC, 'NO'), coalesce(b.PGM, 'NO') FROM A LEFT OUTER ...
429929 Mar 2016 @ 02:55 PDTAnalyticsReplyPassing a string into a macro for use in a IN statementIf column a is a varchar there's no need to CAST(d.token AS INT).
429829 Mar 2016 @ 02:50 PDTGeneralReplyUsing Error in BTEQNot using BTEQ, you must switch to a real load tool, TPump or TPT.
429729 Mar 2016 @ 02:34 PDTDatabaseReplyPerformance of the We do a MERGE into table HUB_ENCOUNTER_MESSAGE from Spool 18767. step of an insertExplain will not tell if TJ is used or not, at Explain time it might be empty, but later populated (it's determined when the actual insert starts).  Life would be much easier if ther...
429628 Mar 2016 @ 02:21 PDTDatabaseReplyConvert MINUS query to OUTER JOINYou can also try a NOT EXISTS: select * from tab1 as t1 where not exists ( select * from tab2 as t2 where (t1.col1 = t2.col1 or (t1.col1 is null and t2.col1 is null) and (t1.col2 = ...
429528 Mar 2016 @ 02:13 PDTGeneralReplyCreate Expiration Date based on next Date Value The next row can be easily accessed using MIN OVER: coalesce(min(InvoiceDate) -- next row's date over (partition by ID order by InvoiceDate ...
429428 Mar 2016 @ 02:07 PDTDatabaseReplyPerformance of the We do a MERGE into table HUB_ENCOUNTER_MESSAGE from Spool 18767. step of an insertIt's not the same table you mentioned in your first post, but the code looks ok.  If you got access to DBQL (Log & Steps) you might check the CALL and the rows for the SQL submitted w...
429328 Mar 2016 @ 02:01 PDTUDAReplyCast and format You can't have 0012.15 in a Decimal column, there are no leading zeros unless you apply a FORMAT. Regarding the variable number of fractional digits the easiest way is this TRIM(col (FORMAT...
429228 Mar 2016 @ 05:24 PDTTeradata ApplicationsReplyT-PUMP DML ERRORYou posted the same question on StackOverflow and it was answered there yesterday...
429125 Mar 2016 @ 05:52 PDTDatabaseReplyHashmap The number of hash buckets is always the same, 2**20 = 1,048,576 There's a process to fill the hash buckets for a n-AMP systems with numbers between 0 and n-1 during sysinit. See the Dat...
429025 Mar 2016 @ 05:32 PDTDatabaseReplyStorage capacity of Teradata 15.10The biggest Teradata system is running at Ebay and has < 50PB, plus larger Hadoop cluster(s).  You will hardly find any other RDBMS capable of storing (and processing) 234PB on a single sy...
428925 Mar 2016 @ 04:15 PDTDatabaseReplyPerformance of the We do a MERGE into table HUB_ENCOUNTER_MESSAGE from Spool 18767. step of an insertIf the SQL runs fast standalone it can't be based on Batch Size. Might be a different transaction handling (within the SP or different session mode), using Transient Journal within the SP and ...
428825 Mar 2016 @ 04:02 PDTDatabaseReplyDBC tables: Teradata V15.10 vs Teradata V15, are they exactly the same?Hi Piyush, afaik modifications to the dbc-tables are only done for xx.0 releases, i.e. 12.0, 13.0, 14.0, 15.0, the next changes will be in 16.0. You might find (reserved for future use) &nbs...
428725 Mar 2016 @ 03:48 PDTDatabaseReplyStorage capacity of Teradata 15.10Let's do some calculations :-) Assuming 6TB per disk 234PB are almost 40,000 disks, that's probably too much for a single server. 234PB * 2048 is almost half a Yottabyte. It is assumed t...
428624 Mar 2016 @ 11:45 PDTDatabaseReplyHow to make substring with the second or third occurrence of a charaterWhat do you mean by "do not work"? STRTOK is built-in since TD14...
428524 Mar 2016 @ 03:39 PDTDatabaseReplyRandom Segregation of data records (dynamically assigning specific values to randomly selected rows)If the number of groups is less than 16 you might apply the existing SAMPLE clause using a two step approach: calculate the exact sample sizes using count(*) / n = sample size for...
428423 Mar 2016 @ 02:34 PDTExtensibilityReplyOracle TruncDate UDF - cannot compile truncdate2Hi Cliff,  this is a bug in the documentation (seems to be for ROUND). As the name implies TRUNC truncates while ROUND rounds :-) SELECT td_sysfnlib.ROUND(DATE,'MM'); 2016-04-0...
428323 Mar 2016 @ 02:29 PDTDatabaseReplyHow to store a timestamp value with seconds constant at :00A timestamp always includes seconds, you can only truncate to the minute (so it's always :00). Or you cast it to a varchar and apply a display format to omit the seconds: CAST(CAST(CUR...
428223 Mar 2016 @ 01:31 PDTDatabaseReplyPerformance of the We do a MERGE into table HUB_ENCOUNTER_MESSAGE from Spool 18767. step of an insertWhat exactly is a long time? How many rows are in that table before the insert? This will probably read/modify/write all existing datablocks due to the sequence.   What's the sett...
428123 Mar 2016 @ 01:22 PDTExtensibilityReplyOracle TruncDate UDF - cannot compile truncdate2Hi Cliff, ROUNDing and TRUNCating DATEs works as expected, but the builtin never return a TIMESTAMP only DATE: SELECT td_sysfnlib.TRUNC(DATE,'MM'); 2016-03-01 SELECT td_sysfnlib...
428023 Mar 2016 @ 01:06 PDTDatabaseReplySum over partition by (with changing variables instead of rows)Hi Ferran, this would be a perfect task for RANGE 12 PRECEDING, but unfortunately Teradata doesn't support it... Is this for a large number of rows? As it's a maximum of 12 rows/months y...
427923 Mar 2016 @ 12:42 PDTDatabaseReplyHow to store a timestamp value with seconds constant at :00The default format for a timestamp is not MM/DD/YYYY: CAST(CAST(CAST(CURRENT_TIMESTAMP AS FORMAT 'yyyy-mm-ddbHH:MI') AS CHAR(16)) || ':00' AS TIMESTAMP(0))   But you ...

Pages