#DateForumTypeThreadPost
262817 Feb 2014 @ 03:49 PSTDatabaseReplyReplacement of order by clauseHi Ritesh, i'm not aware of any change regarding Order By in subqueries in TD14. Order By in RANK is just a logical sort and you query should run as-is in TD14.
262716 Feb 2014 @ 11:52 PSTDatabaseReplyDoes Column Order in an Index Matter? Hi Achieng, when you do a SHOW STATS VALUES you will see that the 25 bytes (25 chars for strings) are used for each column.
262614 Feb 2014 @ 02:20 PSTDatabaseReplydynamic index collect stats statementHi Joe,  you need to add a Group By, e.g. sel 'collect stats on ' || databasename || '.' || tablename || ' column ( ' || tdstats.udfconcat(columnname) || '...
262514 Feb 2014 @ 01:45 PSTDatabaseReplycast an interval type to integer or char example neededCast to char is easy: cast(interval '123 12:34:56.78' day to second as char(17)) But what result do you want for a cast to int? 012312345678? Or the number of seconds like 10672496.2...
262414 Feb 2014 @ 07:30 PSTDatabaseReplyInvalid timestamp literal detected.Why don't you ask this question on a MySQL or MS SQL forum? This is Teradata land :-)
262314 Feb 2014 @ 07:29 PSTGeneralReplyDifference between TeradataForum and Forums.TeradataWhen you read the FAQs at teradataforum.com, you'll notice that it's a private forum (email list) run by John Hall.  It's way older than Teradata's DevEx forum and stillone of...
262214 Feb 2014 @ 07:25 PSTDatabaseReplyHow to get sequence numbers for a particular group based on consecutive valuesHi Sri, you need a DENSE_RANK, this is not supported before TD14.10. But there's a workaround: Missing Functions: DENSE_RANK
262114 Feb 2014 @ 07:23 PSTDatabaseReplyHow to find AMP numbe using Row-Hash value?Hi Sridhar, there are three hash-related functions: - HASHROW to get the hash - HASHBUCKET to get the first 16/20-bits as an Integer, the so-called hash bucket number  - HASHAM...
262012 Feb 2014 @ 10:43 PSTDatabaseReplyDatabase HierarchiesHi Srinivas, dbc.ChildrenV probably provides what you want, just try it :-)
261912 Feb 2014 @ 10:38 PSTDatabaseReplyReplacement of order by clauseNo, you can't do that in any DBMS. WIthout ORDER BY there's no guaranteed order. Why do you ask for it?
261811 Feb 2014 @ 02:23 PSTDatabaseReplyHighest three averagesYou're using Access as database? Ouch. Well, this is a Teradata forum and answers are based on Teradata's SQL dialect.  Access doesn't support QUALIFY or any OLAP function. ...
261711 Feb 2014 @ 08:39 PSTDatabaseReplyCreating subset of data containing Chinese charactersHi Tanay,  looks like market is a CHAR(3), there's a trailing blank. But for this data both conditions should return data, too: where market='CN ' where market='CN' ...
261611 Feb 2014 @ 08:35 PSTDatabaseReplyGROUP BY Processing in TD 14Depending on the algorithm GROUP BY also sorts: ARSA - Aggregate-Redistribute-Sort-Aggregate. And GROUP BY is not always more efficient, there are cases where DISTINCT is faster, if the rows per v...
261511 Feb 2014 @ 07:49 PSTDatabaseReplyMulti column comparisionThis syntax is not supported on Teradata :-( You need to write the long version: select col1, col2 from table where (col3 = 1 and col4 = 2) or (col3 = 3 and col4 = 4)  
261411 Feb 2014 @ 07:45 PSTTeradata ApplicationsReplyWhy is a CAST required in this statement.Because you want to change the datatype? How should the parser know what you want? INTERVAL MINUTE INTERVAL MINUTE TO SECOND INTERVAL HOUR TO SECOND ...
261311 Feb 2014 @ 04:18 PSTDatabaseReplyCheck Case Statement NULLOf course, NULL and '' are totally different. where col1 ='xyz' or ((:col1 is null or :col1 = '') and col1 is null) 
261211 Feb 2014 @ 03:32 PSTDatabaseReplyCheck Case Statement NULLIs this 'xyz' hard-coded? where col1 ='xyz' or (:col1 is null and col1 is null) 
261111 Feb 2014 @ 03:23 PSTToolsReplyCan I perform Delete and Insert in the same triggerOf course this is possible, you just need seperate triggers for Update and Delete. Crreate AFTER INSERT/DELETE triggers with FOR EACH STATEMENT and use INSERT SELECT FROM NEW_TABLE for Insert and ...
261011 Feb 2014 @ 02:16 PSTDatabaseReplyCheck Case Statement NULLwhere col1 = :col or :col is null? Could you please tell exactly what you're trying do do?
260911 Feb 2014 @ 02:14 PSTDatabaseReplyHow to filter NULL from the macro outputYou can only filter on NULLs using IS [NOT] NULL. But WHERE e.id IS NOT NULL? is the same as a Left Join.
260811 Feb 2014 @ 02:10 PSTDatabaseReplyHow Compression WorksHi Nishant, it's odd, (2**n) -1 :-) BITS VALUES 1 -> 1 2 -> 2 - 3 3 -> 4 - 7 4 -> 8 - 15 5 -> 16 - 31 6 -> 32 - 63 7 -> 64 - ...
260711 Feb 2014 @ 01:07 PSTUDAReplyCast and format As I wrote, if there's always the same number of fractional digits with the string you can do  CAST(col AS DECIMAL(8.0)) / 100.00 -- 1000.000 for 3 digits, etc. If you're on TD13 y...
260611 Feb 2014 @ 12:57 PSTDatabaseReplyCreating subset of data containing Chinese charactersHi Tanay, looks like there's something else in your market column. Check the actual data with SELECT CHAR2HEXINT(market) ... where market like '%CHINA%', for 'CHINA' it should...
260511 Feb 2014 @ 12:52 PSTDatabaseReplyHow to filter NULL from the macro outputWhy do you use a Full Outer Join if you don't want that result? Do a Left Join instead or add columns from e to the Select list.
260411 Feb 2014 @ 12:50 PSTPrivate Forum

Pages