#DateForumTypeThreadPost
225318 Sep 2013 @ 03:12 PDTDatabaseReplyEquivalent function for DATEADDDAYOFWEEK is no Teradata syntax, might be a UDF installed at your system. Anyway it's returning the weekday based on sunday as starting day. But you need ISO weeks :-) What is your TD release?...
225218 Sep 2013 @ 01:00 PDTDatabaseReplyEquivalent function for DATEADD  What do you need exactly? There simple math on DATEs like DATE +/- n, there's ADD_MONTHS(DATE or TIMESTAMP, n), there are INTERVALs...   Dieter
225117 Sep 2013 @ 11:56 PDTToolsReplyDoes number of Vprocs on server effect Performance of a SQL QueryHi Kapil, if those were real systems the one with 140 AMPs would have twice the number of nodes, probably 4 instead of 2. Of course this would result in twice the processing power, CPU/IO. Now it...
225017 Sep 2013 @ 11:18 PDTDatabaseReplySQL WorkaroundThere's a specific case i know of when it's not changing the result: e.g. orders and lineitem, both with PI(ordernumber) PARTITON BY orderdate, the join based on the FK will be (ordernumbe...
224917 Sep 2013 @ 01:31 PDTDatabaseReplySelect statements to get metadataHi Dave, of course a database should have consistent data, but even with PK/FK/CHECKs there might be some bad data in a source system or it's only consistent within a single source system, but...
224817 Sep 2013 @ 11:46 PDTDatabaseReplyDate and Datetime in joinHi Sam, i did that CAST for many years, too :-) And then i investigated what was ment to be a bug (similar to your example) and finally found a place in the manual where is stated that when you c...
224717 Sep 2013 @ 10:33 PDTDatabaseReplySelect statements to get metadataHi Dave, you can probably convert the files from VMWare to Hyper-V, most virtualizers can do that: http://technet.microsoft.com/en-us/library/hh967435.aspx   The logical model is not store...
224617 Sep 2013 @ 10:20 PDTDatabaseReplySQL WorkaroundA query rewrite where you change the join-columns will usually change the result set :-) Can you elaborate on this?   Dieter
224517 Sep 2013 @ 09:42 PDTDatabaseReplySQL WorkaroundOk, 48m is not really "fairly small" :-) Are the tables partitioned? Do you actually join all rows or are there some common filtering conditions? How often are those tables accessed? Wha...
224417 Sep 2013 @ 09:13 PDTDatabaseReplySelect statements to get metadataDi Dave, for playing around there's Teradata Express for VMWare: http://downloads.teradata.com/download/database/teradata-express/vmware   Regarding Foreign Keys you might notice that ...
224316 Sep 2013 @ 12:47 PDTDatabaseReplySelect statements to get metadataSeems you use .NET Data Provider. Most of the data should be easily retrieved using the built-in functionality. The reference is found at: http://developer.teradata.com/doc/connectivity/tdnet...
224216 Sep 2013 @ 11:31 PDTDatabaseReplyALTER TABLE Failed [9478] Table must be column partitioned Remove the COLUMN, your query is trying to add a column to a columnar table. Dieter
224116 Sep 2013 @ 10:32 PDTDatabaseReplySQL WorkaroundDefine "fairly big" and "fairly small". A small table will probably be "duplicated to all AMPs" and then joined. Did you check DBQL if this step is actually consuming...
224016 Sep 2013 @ 10:28 PDTGeneralReplySQL return code in stored procedure in TD14The dbscontrol settings might be different or the optimizer is doing some enhanced optimizations which don't fit in the segment anymore.  Nevertheless the code run successfull, you might ...
223915 Sep 2013 @ 03:31 PDTDatabaseReplyFIFO / LIFO For Cost of Goods SoldHi newb1, you got luck, when i saw that competition a few years ago i tried to solve it using Teradata SQL :-) It turned out to be much simpler due to Teradata's support of ROWS UNBOUNDED PRE...
223812 Sep 2013 @ 10:31 PDTDatabaseReplySpecial Characters in TeradataOf course there's no side effect when you install oTranslate if it didn't exist before. And the update is basic: UPDATE tab SET column2 = NULL WHERE column1 IN (SELECT column1...
223712 Sep 2013 @ 02:06 PDTDatabaseReplyFind table size and last access date What do you mean by "issues"? You should simply join on (DatabaseName, TableName).   Dieter
223612 Sep 2013 @ 02:04 PDTDatabaseReplySelecting duplicate records from a table - Complete record and not just the duplicate keysYou said those columns are the Primary Key of the table, but there might be some NULLs in it? This would result in returning less rows.   Dieter
223512 Sep 2013 @ 01:55 PDTDatabaseReplySpecial Characters in Teradata@Khurram: AFAIK regular expressions in Teradata are based on the PCRE open source library: http://en.wikipedia.org/wiki/PCRE There are lots of books and online tutorials for regular expressions:...
223412 Sep 2013 @ 01:26 PDTGeneralReplyCan we get date format as MMM'YYSimply add it to the format: SELECT DATE (FORMAT 'mmm''yy') (CHAR(6)) Dieter
223312 Sep 2013 @ 11:06 PDTDatabaseReplyCondition for generating NULLHi Eliot, ACOS will return NULL only for NULL as input value, but when the value is out of the valid range there should be a 5585 error. So this seems to be a bug, the optimizer doesn't actua...
223212 Sep 2013 @ 10:43 PDTDatabaseReplySelecting duplicate records from a table - Complete record and not just the duplicate keysYou're correct, there should be at least twice the number of rows returned. Your code is overly complex, you don't need the DISTINCT and the Derived Table A, but this will not change the re...
223112 Sep 2013 @ 10:32 PDTDatabaseReplyAccess Rights -- Inheriting natureHi Venkat, "grant STATS on A to all B" only inherits the STATS right on A to all child users of B, but there's no way to get what you want using a single GRANT.   Dieter
223012 Sep 2013 @ 10:23 PDTDatabaseReplyCompare two database Tables, row count in each table which are in different servers The suisse army knife for Teradata DBAs and developers is AtanaSuite :-) http://www.atanasuite.com/ The DeltaTool is all you need, it's included in all versions but Essential.   Dieter
222912 Sep 2013 @ 09:47 PDTToolsReplyKeeping idle connections alive!AFAIK there's now way to do this in SQLA.  You should talk to your DBA, maybe he's willing to increase that value :-)   Dieter

Pages