#DateForumTypeThreadPost
15323 May 2007 @ 11:54 PDTDatabaseReplyViewing Access Rights Details!!Hi Annal,User: dbc.UserRightsRole: dbc.UserRoleRightsDieter
15223 May 2007 @ 11:50 PDTDatabaseReplyMaximum no. of tables in a queryHi Alpesh,SQL Reference: FundamentalsAppendix C: Teradata Database LimitsNumber of tables that can be joined per query block: 64Same limit for V2R5 and V2R6Dieter
15123 May 2007 @ 11:44 PDTDatabaseReplyPhysical Implemetation of the Tables - PPIHi Sushant,there's no reason to rewrite that to a single range to multiple ranges, because the internal partitioning doesn't change.If there's really only a single partition for the first example, ...
15010 May 2007 @ 04:39 PDTDatabaseReplyDifferent data types in TeradataHi Varun,check the manuals:SQL Reference: Data Types and Literalshttp://www.info.ncr.com/eDownload.cfm?itemid=062280005Dieter
14910 May 2007 @ 04:36 PDTDatabaseReplyTD AdministratorHi Varun,just press F1 and read the help file:Preview SQL before submitting it - When you use any of the Tools dialogs to create, clone, or modify databases or database objects, or to grant or revo...
14810 May 2007 @ 03:08 PDTDatabaseReplyYear and Month MaxHi Sam,select *from tabqualify rank() over (order by yr desc, mon desc) = 1Dieter
14703 May 2007 @ 11:22 PDTUDAReplyCreating Derived Column with Qualify and RankHi Barry,of course you can mix OLAP and aggregates within the same query, you just have to use ANSI-style:SELECT'Total ' as Row_One, Name, Sum (Column2) Column2_Sum, Sum (Column3) Column3_Sum, Sum ...
14625 Apr 2007 @ 12:47 PDTDatabaseReplyAutomatically RoundingHi Morashi,according to Standard SQL any calculation involving decimals are rounded after each step, so simply reorder the calculations:SELECTROOM_id,100*SUM(CLOCK_COUNT)/SUM(MONTH_COUNT) AS A,100*...
14530 Mar 2007 @ 05:02 PDTDatabaseReplyCalculate age from birth dateTry(current_date - birthdate) year as ageDieter
14430 Mar 2007 @ 03:14 PDTDatabaseReplyMasking commas within a macro parameterHi Joe,you dothis is a similar approach:http://www.teradataforum.com/teradata/20020719_121740.htmDieter
14328 Mar 2007 @ 04:53 PDTToolsReplyBTEQ examplesHi Swathi,i don't know about mainframe BTEQ, but on Windows/Unix there are two solutions to suppress that "one output line per row":- using more than 1 session - using a ".PACK 1"Dieter
14223 Mar 2007 @ 04:08 PDTAnalyticsReplyConcatenate Rows In A TableHi Prashanthttp://www.teradata.com/teradataForum/shwmessage.aspx?ForumID=1&MessageID=6938Dieter
14121 Mar 2007 @ 12:35 PDTUDAReplyhelp me about grouping functionHi PajinkO,http://www.teradata.com/teradataForum/shwmessage.aspx?forumid=10&messageid=1285Dieter
14021 Mar 2007 @ 06:02 PDTToolsReplyElapsed time to execute a queryHi Celia,"Do anybody know how to configure "elapsed time" to get a message like one next one?*** Total elapsed time was 45.23 seconds."No built in way to achieve that..."Can I get messages like nex...
13921 Mar 2007 @ 05:59 PDTUDAReplyConvert Date 'dd/mm/yyyy' to Date'mm/yyyy'?Hi Benjamin,you have to cast to a char to see a FORMAT in QueryMan:select trim(date_col (format 'yyyy-mm'))Dieter
13820 Mar 2007 @ 05:16 PDTUDAReplyPossible to Count the Cumulative Percentage by SQL?Hi Benjamin,easy using OLAP functions:select records, sum(records) over (order by ??? rows unbounded preceding) as Accum_Value, 100 * Accum_Value / sum(records) over () from tabDieter
13719 Mar 2007 @ 04:05 PDTJobsReplyHow to use COALESCE fun with date datatypeHi Kamal,date: COALESCE(date_col, date '2007-03-19')string: COALESCE(trim(date_col), 'blabla')Dieter
13615 Mar 2007 @ 05:59 PDTUDAReplyCount the Max Continuous Inactive Days by SQLHi Benjamin,use ROW_NUMBER instead of RANK or a nested aggregate or DISTINCT.Dieter
13515 Mar 2007 @ 03:58 PDTUDAReplyCount the Max Continuous Inactive Days by SQLHi Benjamin,if there are no gaps and exactly one row per day:SELECT subs_id, flag, COUNT(*)FROM (SELECT subs_id, subs_date, flag, RANK() OVER (PARTITION BY subs_id, flag ORDER BY subs_date...
13426 Feb 2007 @ 12:29 PSTAnalyticsReplyHow to optimize queries with grouping sets?Hi Teddy,192 levels of aggregations (and 384 aggregate steps in Explain) on a base set of 120 mio. rows needs a loooong time.Are you really shure you (or Cognos) needs those 192 levels?Dieter
13326 Feb 2007 @ 06:30 PSTAnalyticsReplyHow to optimize queries with grouping sets?And now for the 1 Mio. dollar question:How many aggregate levels are calculated by group by rollup(1,2,3), rollup(4,5,6), rollup (7,8), grouping sets ((12,11),(12,10),(12,9),())a. 3 + 3 + 2 + 4 = ...
13219 Jan 2007 @ 06:46 PSTDatabaseReplyAdding rights for use DDL in procedureHi Max,due to security reasons the creator and the owner of the SP *must* be the same, if you want to submit any DDL or Dynamic SQL, i.e. User xy submits "create procedure xy.spname as ..."Check th...
13119 Jan 2007 @ 06:38 PSTDatabaseReplyIs WITH (non recursive) a syntactic sugar?Hi timrick,i usually got more efficient plans using WITH, especially if there's an aggregate or OLAP function.I tried your query on similar data, when i removed the "where years = 1996" the optimiz...
13017 Jan 2007 @ 01:51 PSTDatabaseReplyMore elobarate on PPIHi Rajan,Database DesignChapter 10: Primary IndexesPartitioned and Nonpartitioned Primary Indexes"Rows are ordered first by their partition number, then by row hash value within eachpartition."Dieter
12916 Jan 2007 @ 02:51 PSTDatabaseReplyUsing Functions in TeradataHi Jaguar,looks similar to a User Defined Function (UDF) in Teradata, but those must be written in C/C++.Check the manuals for details or download some example UDFs from teradata.comDieter

Pages