#DateForumTypeThreadPost
322821 Oct 2014 @ 02:51 PDTToolsReplyTeradata Administrator References and ProceduresHi Peter, TD Admin runs a LIKE on the internal CreateText of Views and Macros (and it will not return nested objects). But the source code of an SP is not stored in any system table, only a SHOW ...
322721 Oct 2014 @ 02:43 PDTDatabaseReplyCalculate Last Business Day of Previous MonthHi Sarang, what's your definition of business day?
322621 Oct 2014 @ 02:42 PDTGeneralReplyAdditional padding characters that are not removable with TRIM functionhex '00' is not a space, only hex '20', you need to trim both. And the CHR function needs decimal, not hexadecimal values. You seem to run TD14, try RTRIM(COL1, '2000'XC)
322521 Oct 2014 @ 02:35 PDTDatabaseReplyTD_UNPIVOT throwing error: SELECT Failed. [9134] TD_UNPIVOT_CONTRACT; Help is confusingHi Jerry, I think this function is installed by one of the DIP scripts during upgrade, maybe it didn't run. If select DatabaseName from dbc.FunctionsV where FunctionName = 'TD_UNPIVO...
322421 Oct 2014 @ 02:31 PDTGeneralReplySelect data from one row, while on another row in the same table.The MIN OVER returns the minumum date after the current row, you probably need to change it to: min(case when SCC.Day_Of_Week in (1,7) or HC.Holiday is not null then null els...
322321 Oct 2014 @ 02:28 PDTDatabaseReplyStart dates overlap You didn't specify the rules how to determnine the output. Maybe case when min(end_dt) over (partition by username order by start_dt, end_dt ro...
322220 Oct 2014 @ 01:54 PDTData ModelingReplyspecial characters such as '¬', crtl B, crtl A etc from sybase to TDWhat's your TD release? In TD14 there's a CHR(2) function, or you can use a hex-literal '02'xc
322120 Oct 2014 @ 01:46 PDTDatabaseReplyTD_UNPIVOT throwing error: SELECT Failed. [9134] TD_UNPIVOT_CONTRACT; Help is confusingHi Jerry, your query is syntactically correct. Are you sure you run it on 14.10?
322020 Oct 2014 @ 01:39 PDTGeneralReplySelect data from one row, while on another row in the same table.Hi Genesius, you need to find the minimum date where the date is not a weekend or holiday:  min(case when SCC.Day_Of_Week in (1,7) or HC.Holiday is not null then null ...
321919 Oct 2014 @ 04:19 PDTToolsReplyUpdating an aggregate table from detail table using MLOAD (multiload) or job.Hi Saumil, what you need is a simple SQL MERGE. Based on the tool you actually use, after the END MLOAD or in an APPLY to a DDL Operator. And of course you need a key to update a row, in your ca...
321818 Oct 2014 @ 10:14 PDTToolsReplyBTEQ IMPORT EXPORT DATAHi Jugal, then this might be related to some setting, don't know, maybe try SET SESSION DATEFORM = ANSIDATE
321718 Oct 2014 @ 10:11 PDTDatabaseReplyTeradata data type conversion and ANSI data type conversionThis is independent of the session mode ANSI/Teradata. 0 (decimal(3,0))(varchar(3)) is a Teradata style typecast, while cast(cast( 0 as decimal(3,0)) as varchar(3)) is ANSI style. When you d...
321618 Oct 2014 @ 10:02 PDTDatabaseReplyHow to convert JAN 1, 2007 12:00:00 AM into timestamp format 'YYYY-MM-DDBHH:MI:SS' ???Hi Shardul, try TO_TIMESTAMP(x, 'mon dd yyyy hh:miam')
321518 Oct 2014 @ 10:00 PDTData ModelingReplyPartitioning on a flag (column)I don't think this will be efficient, when you update the flag all rows will be moved (=deleted and re-inserted) to the new partition. Instead of a current flag you might simply define daily p...
321418 Oct 2014 @ 09:44 PDTDatabaseReplyBusiness Day calculationThe solution I prefer is a business_day number column in my calendar table, then you simply do two joins on start_date/end_date and calculate the difference. As you have rules what's a busines...
321318 Oct 2014 @ 09:35 PDTDatabaseReplyDML through multi table viewHi Sravanthi, Teradata (like most DBMSes) doesn't allow updates on multi-table views. Only single-table SELECTs without JOIN, ORDER BY, aggregations or calculations can be updated.
321218 Oct 2014 @ 09:33 PDTDatabaseReplyVolatile Tables in MacrosHi Raghu, any DDL request in Teradata must commited (no other SQL after it allowed) and a macro is always a MultiStatement Request, so there's no way to create and then use a Volatile Table in...
321118 Oct 2014 @ 09:28 PDTToolsReplyUpdating an aggregate table from detail table using MLOAD (multiload) or job.Hi Saumil, simply run a SQL UPDATE, you can do this after the END MLOAD or in a BTEQ script.
321016 Oct 2014 @ 01:50 PDTDatabaseReplyUpdate the table with min and max timestamp select Name, min(case when Status = 'A' then Starttime end) end, max(case when Status = 'C' then endtime end) end from tab group by 1 This seems to match your data...
320916 Oct 2014 @ 01:33 PDTDatabaseReplyhow/where to find inherited rights acquired by user when created?Check the rights granted to PUBLIC or granted with the ALL option, dbc.AllRightsV.AllnessFlag = 'Y'
320816 Oct 2014 @ 01:27 PDTDatabaseReplyLooking for SQL to recreate existing statistics in teradata 14Hi Akleema, check my New StatsInfo query for TD14
320716 Oct 2014 @ 11:50 PDTDatabaseReplyNeed help in Optimizing Row_Number/RANK() operationsAre you sure that this is returning the expected result? Seems like you want to combine multiple consecutive rows with the same values into one, a slowly changing dimension? This is why there are ...
320616 Oct 2014 @ 10:56 PDTToolsReplyBTEQ IMPORT EXPORT DATABoth DOJ (CHAR(26)) or DOJ (TIMESTAMP(6)) should work if the timestamp is exported in the correct format: YYYY-MM-DD HH:MI:SS.SSSSSS So check the timestamp in your data file.
320515 Oct 2014 @ 11:56 PDTDatabaseReplyTarget row is being updated by multiple source rows in an Update statementThe WHERE-condition is missing: ... SET BPP_User_Id = ppage.ID ,Email_Address = ppage.Email ,Last_name = ppage.Last ,First_name = ppage.First WHERE tgt.Email = ppage.Email; &n...
320415 Oct 2014 @ 11:11 PDTAsterReplyAster Express TutorialHi Sascha, I don't know exactly what was covered by the tutorial, but there's a Getting Started Guide on the new Aster 6 download page:        Aster Express 6.00.0...

Pages