#DateForumTypeThreadPost
462807 Sep 2016 @ 12:24 PDTDatabaseReplyCompute with immediate previous row value derivedYour calculation is similar to  1000 * 1.1 ** (row_number() over (order by Date)-1) To get he start value you might try min(Amount) over () * 1.1 ** (row_number() over (order by Date)...
462703 Sep 2016 @ 09:20 PDTDatabaseReplyDBC Diskspace, Wow, less than 1 percent for dbc, that's definitely way too low. What's the % perm space in use?
462603 Sep 2016 @ 01:43 PDTDatabaseReplyGrouping while combining Date and HourThe easiest way is to group by two columns: CAST(row_added_ts AS DATE), EXTRACT(HOUR FROM row_added_ts)   You can also cast to a string, but your format will not allow correct sorting:...
462502 Sep 2016 @ 01:57 PDTDatabaseReplyCreating a Dynamic YoY Date Range in Case Statement for Current Quarter QTDYou can apply TRUNC & TO_CHAR like this: CASE WHEN date between TRUNC(CURRENT_DATE-1, 'Q') AND CURRENT_DATE-1 THEN TO_CHAR(CURRENT_DATE-1, '"Q"Q"_"yy...
462401 Sep 2016 @ 02:38 PDTDatabaseReplyUsing WITH Statement Modifier instead of Temp Tables?AFAIK it will be resolved in TD16.
462301 Sep 2016 @ 02:20 PDTDatabaseReplyInsert taking longSET Table plus bad Primary Index ('3PCL','3PDM','3POR')?
462201 Sep 2016 @ 02:14 PDTDatabaseReplybetween condition make bad execution planThere's no way to avoid the product join because it's not an equi-join.   What are you trying to achieve? Table A is probably a calendar and you'll get multiple rows for each ro...
462131 Aug 2016 @ 11:00 PDTDatabaseReplySingle vs double quotesIt's working as expected by Standard SQL (and similar in most DBMSes): Single quotes oare string delimiters. Double quotes are used for identifiers like column & table names. But in Terad...
462031 Aug 2016 @ 10:56 PDTDatabaseReplyTable A Left Outer JOIN Table B VS Table B Right Outer JOIN AYes, it's only a syntax variation.
461931 Aug 2016 @ 03:13 PDTDatabaseReplyequivalent function for Month(); DateAdd()Hi Patrick, the Standard SQL way would be EXTRACT(MONTH FROM col), but you better avoid functions on both sides of a comparison:  Where Date_attribut between TRUNC(CURRENT_DATE, 'mon&#...
461831 Aug 2016 @ 02:36 PDTDatabaseReplyWhy does Teradata Express come only as a VM component? Why not as a standalone software to be installed on physical desktop?Hi Subhayu,  you simply install the Teradata Client for Windows: TTU - Windows Install
461730 Aug 2016 @ 09:21 PDTGeneralReplyLast 6 Month in Query - Failing on August 30This is not Teradata logic, it's stupid Standard SQL (In fact you can't use INTERVAL-syntax for both YEAR and MONTH). That's why there's ADD_MONTHS :-) WHERE DB.LOG_DATE > A...
461630 Aug 2016 @ 08:24 PDTDatabaseReplyWhy does Teradata Express come only as a VM component? Why not as a standalone software to be installed on physical desktop?Is your physical desktop running Suse Linux Enterprise? Most PCs got a Windows operating system and there's no (more) Teradata for Windows. Additionally it's more convenient to simply sta...
461525 Aug 2016 @ 09:50 PDTDatabaseReplyCase statement syntax change?There's no YEAR or MONTH function in Teradata, this is (deprecated) ODBC-syntax, which might be automatically replaced with valid SQL by the ODBC driver. In older releases of SQL Assistant...
461424 Aug 2016 @ 02:17 PDTDatabaseReplyODBC TimeStamp See if this works. On a session level set the timezone to your local daylight saving timezone: SET TIME ZONE 'America Brazil'; and then remove the '-00:00' and cast like this...
461324 Aug 2016 @ 06:51 PDTDatabaseReplyInsert records in bulk into a Teradata TableNo, SQL Assistant, everything is faster than this. Better do it Teradata Studio (if you prefer a GUI, it will use the JDBC FastLoad protocol if the target table is empty) or switch to TPT (If it&#...
461224 Aug 2016 @ 05:39 PDTToolsReplyfastload cannot start with error "The request exceeds the length limit, The maximum length is 1048500."Can you show the actual FastLoad script?
461122 Aug 2016 @ 11:13 PDTDatabaseReplyConvert date > xx/01/xxxx of given month to first of following monthThe calculation might be simplified to: if it's not the first day of a month calculate the last day and add one day CASE WHEN EXTRACT (DAY FROM COLUMNNAME) = 1 THEN COLUMNNAME ...
461020 Aug 2016 @ 05:20 PDTToolsReplyUnicode Export through TPTYou must triple the VarChar size in your Export Schema, not in your Select.  Additionally you don't need to specify a schema at all, when the Format is DELIMITED, and your Select can be a...
460919 Aug 2016 @ 03:55 PDTDatabaseReplyHow to make substring with the second or third occurrence of a charaterMaybe this issue was fixed in a version after 14.00.03.02, time to get the latest patch level (or upgrade)
460819 Aug 2016 @ 03:53 PDTToolsReplyMonth days !!!What DBMS is this? Looks like MS SQL Server, but this CURRENT_DATE.DAY is strange.   Would be easier if you add the current result, but this seems to return the last day of the current...
460719 Aug 2016 @ 03:45 PDTTeradata DebuggerReplyFetching the last date of the current Quarter !!! If you consider this correct: SELECT TRUNC(ADD_MONTHS(DATE '2016-10-20',-1),'Q'); *** Query completed. One row found. One column returned. *** Total elapsed time was 1 seco...
460619 Aug 2016 @ 03:35 PDTUDAReplyCONVERT and DATEDIFF in TeradataSee the TimeStamp_to_UnixTime UDF found in http://forums.teradata.com/forum/general/convert-13-digit-epoch-time-to-date
460519 Aug 2016 @ 03:25 PDTDatabaseReplyPadding and timestampYou can use a Regular Expression to add the missing zeroes:  REGEXP_REPLACE(FDOE_QTR, '\b([0-9])\b', '0\1') see: http://forums.teradata.com/forum/enterprise/convert-varchar-t...
460418 Aug 2016 @ 07:48 PDTDatabaseReplyHow to use regex in Teradata or 'LIKE' operator in teradata[0-9] is a range of characters and + means repeat the previous at least once.

Pages