#DateForumTypeThreadPost
427823 Mar 2016 @ 04:03 PDTDatabaseReplyStore Negative decimal value into teradata datatypeIf there's some bad data you might use TO_NUMBER(col) which returns NULL instead of an error message, e.g. WHERE TO_NUMBER(col) IS NULL shows those rows...
427723 Mar 2016 @ 03:30 PDTDatabaseReplyTeradata REGEX, UDF QueryThe easiest way is using nested REGEX_PREPLACE, one for each pattern. Of course CPU usage will be high. I don't know if lots of regexes in a C-UDF might be more efficient, maybe try the SQL w...
427623 Mar 2016 @ 03:26 PDTDatabaseReplyCOUNT () OVER (PARTITION BY) and DISTINCTHi Lakshminarasu, as DISTINCT is not allowed you need two nested OLAP functions: SELECT ... SUM(flag) OVER (PARTITION BY COL_1, COL_12) FROM ( SELECT .... -- tag only one...
427523 Mar 2016 @ 03:08 PDTTeradata ApplicationsReplyProblem to reset date column in a scenarioThis is a kind of logic which can't be done without recursion/loop. Did you use a CURSOR or loop? Probably a cursor based on "runs for hours" :)   If the number of rows per&nb...
427423 Mar 2016 @ 02:52 PDTDatabaseReplyTransposing Rows to ColumnsYou can use a mixture between Chinmay's and Sakthi's queries: SELECT MAX(CASE WHEN OCCUPATION = 'Actor' THEN NAME end) AS Actor, MAX(CASE WHEN OCCUPATION = 'Doct...
427323 Mar 2016 @ 02:41 PDTExtensibilityReplyOracle TruncDate UDF - cannot compile truncdate2Why do you install the Oracle UDFs? Most of them are built-in since TD14.10 and can be found in TD_SYSFNLIB. The functions in TD_SYSFNLIB are more efficient and fully supported.  I could...
427223 Mar 2016 @ 02:28 PDTDatabaseReplyStore Negative decimal value into teradata datatypeThere are no unsigned numeric data types in Teradata, so a DECIMAL(xx,2) seems to be correct. If there's no visible minus sign it's a display issue in your client.
427120 Mar 2016 @ 09:01 PDTDatabaseReplyRecursive Query Column length Hi Ben, in Teradata the first Select of a UNION determines the resulting data type, you need to CAST to a larger VarChar like "CAST(orig||'->'||dest AS VARCHAR(100))". The&nb...
427020 Mar 2016 @ 05:52 PDTDatabaseReplyCopy data from one database to another on the same server Did only the copy time double or other operations, too? Maybe the new server is less performant?  
426920 Mar 2016 @ 05:49 PDTTeradata ApplicationsReplyTPUMP NOT WORKINGBTEQ and TPUMP are different utilities...
426820 Mar 2016 @ 05:49 PDTGeneralReplyColumns Transformation to Sets boundaries If the values are unique you can utilize that both your value column and a ROW_NUMBER are sequential: SELECT MIN(seqval) AS StartVal, MAX(seqval) AS EndVal, COUNT(*) FROM ( SEL...
426717 Mar 2016 @ 02:59 PDTGeneralReplyQuestion on SAS in TeradataDouble check if the combination of (pst_obligor_id,pst_fac_id,pst_sys_id,Maturity_date) is actually the same for those rows, you didn't show all columns in the screen shot...
426617 Mar 2016 @ 01:36 PDTGeneralReplyDo Forum posts get deleted ?There are four comment pages and your comment is on the 2nd page :-) Seems like the forum software only jumps to a comment when it's on the 1st page, otherwise it's simply showing the top ...
426517 Mar 2016 @ 12:42 PDTDatabaseReplyUsing stored procedure variables in a SAMPLE clauseThere's a lot of details on how to use Dynamic SQL in the manuals: http://www.info.teradata.com/HTMLPubs/DB_TTU_15_00/index.html#page/SQL_Reference/B035_1148_015K/ch05.140.57.html
426417 Mar 2016 @ 12:40 PDTToolsReplyUsage of multiple sessions by Teradata utilities like FL/ML/FE/TPT job ?Hi Sanket, passing a datablock to a session is much faster than exporting that block, so the 1st session is still working when the 2nd session gets the next block and so on...   There's...
426317 Mar 2016 @ 12:12 PDTGeneralReplyDo Forum posts get deleted ?Which topic?  Posts are only deleted when spamming (and then those users are blocked). Btw, in 99%+ the spammers don't get past the first step, "approving" their first comment/...
426216 Mar 2016 @ 11:09 PDTDatabaseReplyMerge - Without insert when not matched?If you can't match the (P)PI in ON you can't use MERGE and must go for UPDATE instead.
426116 Mar 2016 @ 10:52 PDTDatabaseReplyMerge - Without insert when not matched?Yep, simply omit the WHEN NOT MATCHED part.
426016 Mar 2016 @ 10:40 PDTDatabaseReplyRegular expression with irregular resultHi acifuentes, yep, that's helpful. Btw, if you actually need to extract all values as individual columns you might also use CSVLD instead, although the syntax is a bit complicated (it's ...
425916 Mar 2016 @ 09:11 PDTToolsReplyUsage of multiple sessions by Teradata utilities like FL/ML/FE/TPT job ?Hi Sanket, FExp creates datablocks (you can see the number in output) and passes them to the next available session, in your case it's a small number of blocks (maybe only one), so the 1st ses...
425816 Mar 2016 @ 09:06 PDTDatabaseReplyStored Procedure executionThe parser will convert all COALESCE/NULLIF into CASE expressions (they're just convenient shortcuts) and adds lots of brackets. So seems like you looked at dbc.QryLogExplainV?   Perfro...
425716 Mar 2016 @ 09:02 PDTGeneralReplyError 6706 The string contains an untranslatable characterOn the wiki page there's a link to the Unicode Tool Kit, udf_utf16to8 is part of it. Talk to your DBA to get it installed.
425616 Mar 2016 @ 07:11 PDTGeneralReplyError 6706 The string contains an untranslatable characterDoes your SHA256-UDF accept Unicode? If it's the one from GitHub it's Latin only.   But there's a solution, see https://github.com/akuroda/teradata-udf-sha2/wiki It works fine ...
425516 Mar 2016 @ 06:24 PDTDatabaseReplyFinding value in previous row in a partition SQL Assistant is a client, not the DBMS, see "Help - About SQL Assistant"  for the TD version (probably 14.10, too).   You can't reference another row in WHERE (but you mi...
425416 Mar 2016 @ 05:24 PDTCloud ComputingReplyTDExpress14.10 Sles10: No proceed from "DBS state is 1/5: DBS Startup - Voting for Transaction Recovery"Did you wait and repeat it? Check "/var/log/messages" for details.

Pages