#DateForumTypeThreadPost
435306 Apr 2016 @ 12:33 PDTDatabaseReplyHelp with SQL for reporting month totalsSwitching to DENSE_RANK instead of ROW_NUMBER should work.
435206 Apr 2016 @ 12:28 PDTDatabaseReplyCumulative Sum by distinct customer ID by yearThe UNION is just for creating the base data, of course this will be a Select on your actual table.
435106 Apr 2016 @ 12:27 PDTGeneralReplyHow to sum up the columns total value in the last rowHi Shavyani, I don't know exactly what you want as you didn't show source data & expected result. If you need to return both the sum and the date details you might need to add OVER (P...
435006 Apr 2016 @ 10:13 PDTDatabaseReplyReplace some special characters in Teradata oTranslate(col, 'ΦΘ╔╛√', 'èéɾû') Did you load wrong data or using a wrong character set?
434906 Apr 2016 @ 08:56 PDTDatabaseReplyFiltering on dates - Explain plan looks right but it returns 0 rows. One expects a DATE when a column is named DATE, so it's important infomation when it's an INT instead. Currently you're comparing DATEs and INTEGERs and they simply don't match. I...
434806 Apr 2016 @ 08:20 PDTToolsReplyTeradata Studio and Teradata Analyst PackSome software (like the Analyst Pack) is only available for licensed sites and not via DevEx-download. In fact most customer sites don't want/like/allow end users to install software on their ...
434706 Apr 2016 @ 08:03 PDTDatabaseReplyfrom table with daily log to table with from-to datesIf you don't have to return additional columns besides cust/prod/date: TD14.10 SELECT cust, product, BEGIN(pd), END(pd) FROM ( SELECT NORMALIZE cust, product, PERIOD(...
434606 Apr 2016 @ 07:44 PDTDatabaseReplyFiltering on dates - Explain plan looks right but it returns 0 rows. Todd is probably right, what's the data type of date_chk: DATE, INTEGER, CHAR?
434506 Apr 2016 @ 07:39 PDTDatabaseReplyhelp optimizing GROUP BY queryPartitioning does not change the distribution of rows, just the internal order, distribution is only based on PI. What's your current PI? I usually assume that OLAP-functions are more efficien...
434406 Apr 2016 @ 07:31 PDTToolsReplyTPT load to table which contains special characters in name and column namesShould be the same, to get a single quote you need to double it within the string, thus your string should be four quotes: #1 starts the string, #2 & 3 is the escaped quote and #4 closes the s...
434306 Apr 2016 @ 06:04 PDTDatabaseReplyfrom table with daily log to table with from-to datesHi Youri, what if there are gaps, e.g. no row for 17/01/2016, should this result in one or two rows?
434206 Apr 2016 @ 02:48 PDTDatabaseReplySQL for Deleting Data Older than n Years + current YearYep, of course. This was just to force additional mental effort :-)
434105 Apr 2016 @ 11:37 PDTDatabaseReplyFiltering on dates - Explain plan looks right but it returns 0 rows. Unless you run it on the first day of a month both BETWEEN should return the same result. Did you double check if both Explains are the same? What's your TD release, 1160301 instead of D...
434005 Apr 2016 @ 11:30 PDTGeneralReplyHow to sum up the columns total value in the last rowHi Shavyani, if I understand you correctly it's a conditional aggregate like: select colA ,sum(case when abs(date2-date1) between 1 and 10 then col end) ,sum(case when abs(d...
433905 Apr 2016 @ 12:25 PDTDatabaseReplyOLAP function: CSUM / SUM with Reset valueIf CURR_VALUE is actually always increasing you only need a MAX, which results a single STAT-step. MAX(NULLIF(CURR_VAL, 0)) OVER (--partition by ... ORDER BY day_dt ROWS UNBOUN...
433805 Apr 2016 @ 07:32 PDTTeradata StudioReplySQL WARNING from statement: State = HY000, Error Code = 1298Oops, I didn't notice that it's a transfer using TD Studio, of course then there's a target table :) Strange, replace existing used to work for me....  
433705 Apr 2016 @ 07:24 PDTToolsReplyWINCLI32.dllWell, Teradata is not 3rd party to Teradata :) BTEQ is usually installed as part of TTU, which includes CLI, too.   And the latest Windows version can be found here
433605 Apr 2016 @ 07:20 PDTTeradata StudioReplySQL WARNING from statement: State = HY000, Error Code = 1298You got the exactly the same error message: "FastExport WITH NO SPOOL is being used"? Then you can still ignore it, there must be something else. Btw, FastExport doesn't load, ...
433505 Apr 2016 @ 05:08 PDTDatabaseReplyAccess module error '61' in mload insertOf course you can load duplicate rows using MLoad, but your script stopped at the first record. What's your .IMPORT, does it include FORMAT VARTEXT '|'?
433405 Apr 2016 @ 05:05 PDTGeneralReplyCriteria to select Multivalue compressionYou find all details on MVC in the Database Design manual, e.g.: http://www.info.teradata.com/htmlpubs/DB_TTU_14_10/Database_Management/B035_1094_112A/ch14.064.020.html#ww18090665
433305 Apr 2016 @ 04:15 PDTDatabaseReplyAccess module error '61' in mload insertThe layout definition doesn't match you input file. Did you specify the correct delimiter?
433205 Apr 2016 @ 04:14 PDTDatabaseReplyconvert integer value to binaryYou don't to convert to a bit-string, there are a lot of built in functions doing bit-manipulation on integers/bytes: http://www.info.teradata.com/htmlpubs/DB_TTU_14_10/index.html#page/SQL_Ref...
433105 Apr 2016 @ 12:33 PDTDatabaseReplyconvert integer value to binaryInstead of casting the VarChar to Unicode you can use this: TO_BYTES(VL, TRANSLATE('base10' USING unicode_to_latin)) This UDF needs both parameters of the same character set...   F...
433005 Apr 2016 @ 12:27 PDTGeneralReplyError 2616 while doing an insertThe result of a calculation exceeds the defined range of one of the target columns. You could do a CREATE VOLATILE TABLE vt AS (SELECT ....) WITH NO DATA; to get the resulting data types and compa...
432905 Apr 2016 @ 12:26 PDTTeradata DebuggerReplytable is not specified in the FROM clause or already aliased by another name error msg when using a variable from VTThere seem to be different scoping/parsing rules for Subqueries, you need to add it to the FROM FROM PTPROD.CASPAC_Results CROSS JOIN Rpt_Dt WHERE   Btw, have a...

Pages