9311 Aug 2016 @ 11:51 PDTGeneralReplyMulti Column Primary Index and Secondary IndexIF its a big table, definitely partition will help....
9211 Aug 2016 @ 11:48 PDTGeneralReplyImprove performance on an analytical query , mulitple columns using same set of partitionsWhats the volume of the data in the table and what is the join type
9111 Aug 2016 @ 11:44 PDTGeneralReplyLooking for help with regards to nested aggregates Is this what you are expecting? SEL A,COUNT(DISTINCT B),COUNT(DISTINCT C),SUM (SM1) FROM (SEL A,B,C, CAST(AVG(D) OVER (PARTITION BY A,C ORDER BY A ROWS BETWEEN UNBOUNDED PRECEDING AND UNB...
9011 Aug 2016 @ 10:41 PDTDatabaseReplyCapturing MAX marks for Each Student when the MArks are in ColumnsIt should work..Can you post your data.
8914 Jul 2016 @ 12:37 PDTDatabaseReplyNeed to generate a row number like columnCan you post the expected result?
8816 Jun 2016 @ 01:41 PDTDatabaseReplyHow to group depending on number of recordsYou need to have an order by clause and group the records...Is that your exact requirement?
8714 Jun 2016 @ 04:46 PDTDatabaseReplyIs it an ordering - How do I generate a column that gives me the seq no of the selectRowid cannot be retrieved like Oracle afaik..
8614 Jun 2016 @ 04:39 PDTDatabaseReplyDegraded Query performance while performing insertionCan you post the ddls of the lookup and the source tables...
8514 Jun 2016 @ 04:32 PDTDatabaseReplyRetrive data from tableUse the condition....where empid is not null or partyid is not null
8414 Jun 2016 @ 02:36 PDTGeneralReplyto remove duplicatesCan you post some sample data
8314 Jun 2016 @ 02:24 PDTDatabaseReplyPerformance on having more than 30 Left outer joinvolume of the lookup tables?...
8214 Jun 2016 @ 02:17 PDTDatabaseReplyConvert text to a timestampCAST(CAST(TO_TIMESTAMP(OREPLACE('June 07,2016,HOUR 1','HOUR',''),'MONTH dd,yyyy,HH24') AS VARCHAR(19)) AS TIMESTAMP(0))
8107 Jun 2016 @ 06:19 PDTDatabaseReplyHow to get first date of last month based on max date from another table?Try with brackets.. SELECT ADD_MONTHS((SELECT MAX(RPT_MTH) FROM db.RPT_MTH) - EXTRACT(DAY FROM (SELECT MAX(RPT_MTH) FROM DB.RPT_MTH)) + 1,-1)
8007 Jun 2016 @ 05:41 PDTDatabaseReplyLeast/Greatest Function with Datesyou mean exclude null dates? ..where clause to be used?
7919 May 2016 @ 01:16 PDTAnalyticsReplystored proc to insert multiple tables into single tableYes, you can use macro or stored procedure to insert. If its a simple insert statement, use macro (you need to invoke macro, everytime you insert). If it involves parameters and complex logic, go f...
7819 May 2016 @ 01:08 PDTDatabaseReplyColumn value is refered as Column_Name in another tableCase statement would be better, if you are confident about the number of columns. Far better than recursive.
7717 May 2016 @ 12:30 PDTDatabaseReplyConversion of Integer to Date Format in TeradataSELECT ADD_MONTHS(TO_DATE('201501','YYYYMM'),-3)
7611 May 2016 @ 04:12 PDTAnalyticsReplyconcatenate multiple rowsUse Recursive function to concatenate
7410 May 2016 @ 11:30 PDTGeneralReplyConvert Text to NumberIf you are sure about the numeric value, then cast(col as decimal(9,1)) IF you are unsure about the numeric value, then case when to_number(col) is not null then cast(col as decimal(9,1)) else...
7310 May 2016 @ 03:22 PDTDatabaseReplyMULTILOAD and NUSIMultiload doesn't support inter amp operation. NUSI is amp local, due to which Multiload supports.
7210 May 2016 @ 03:19 PDTDatabaseReplySpool space issueTry to check if there are duplicates on the join columns. If exists, remove those. Ignoring will leave to bad perf. Try to collect statistics on the join columns. 
7109 May 2016 @ 12:14 PDTDatabaseReplyNeed help finding correct start dates SEL DISTINCT A5,MIN(A2) OVER (PARTITION BY A1,A5 ORDER BY A2 ASC) AS A6 FROM  (SEL A.*,SUM(ACCT_2)  OVER (PARTITION BY ACCT_1 ORDER BY START_DATE DESC RESET WHEN ACCT_2 <>...
7008 May 2016 @ 11:26 PDTDatabaseReplyHelp with update statementWhats the issue? I suspect the syntax may not be correct.
6906 May 2016 @ 01:56 PDTDatabaseReplyHow to access a huge table. Try to partition the data based on the needs. A proper partition will speed up the operation.