#DateForumTypeThreadPost
4928 Nov 2013 @ 02:36 PSTDatabaseReplyRe-writing a query interms of performanceSure Deiter,Please find the below explain plan.It is showing as 2 min .But when I execute it,it takes more than 45 mins.. 1) First, we lock KEY_T in view KEY_1 for access, and we lock ...
4827 Nov 2013 @ 10:29 PSTDatabaseTopicRe-writing a query interms of performanceCREATE MULTISET TABLE KEY_T ,NO FALLBACK , NO BEFORE JOURNAL, NO AFTER JOURNAL, CHECKSUM = DEFAULT, DEFAULT MERGEBLOCKRATIO ( DW_CREAT_DT DATE FORMAT 'YYYY-MM-D...
4720 Nov 2013 @ 03:05 PSTDatabaseReplyCASE STATEMENT  Paste this in SQL assistant to gain understaing of indentation. CASE WHEN PLNV.LMV_BUS_TYPE_NEW='COR' THEN    CASE WHEN LM_PASS_THRU_EXPRESS_IND = '3' THEN...
4620 Nov 2013 @ 03:02 PSTDatabaseReplyCASE STATEMENT CASE WHEN PLNV.LMV_BUS_TYPE_NEW='COR' THEN  CASE WHEN LM_PASS_THRU_EXPRESS_IND = '3' THEN LV_LX_FUND_PRIN_BAL          &nb...
4520 Nov 2013 @ 02:31 PSTDatabaseReplyGet previous column vale till it reaches another not null valueYes.I have approached using start and end dates concepts.But still,bcoz of this i came to know one new option in OLAP.Thank you.
4420 Nov 2013 @ 02:29 PSTDatabaseTopicAdhoc SQL requestCREATE TABLE ORDER_SRC ( ORDER_ID INTEGER, ORDER_TEMPLATE_ID INTEGER ); INSERT INTO ORDER_SRC VALUES(1,3); INSERT INTO ORDER_SRC VALUES(2,4); INSERT INTO ORDER_SRC VALUES(3,6); INSER...
4315 Nov 2013 @ 03:22 PSTDatabaseReplyGet previous column vale till it reaches another not null valueCan you pls repost the link as I am unable to get it..I am seeing a scroll bar only.
4215 Nov 2013 @ 03:12 PSTDatabaseReplyGet previous column vale till it reaches another not null valueExcellent Saeed! I have never come accrsoo through RESET usage.Really it's an eye-opener.Could you please give me any link that provides more infor RESET usage
4115 Nov 2013 @ 02:31 PSTDatabaseTopicGet previous column vale till it reaches another not null valueCT LKP(EMPNO INTEGER,TYPE_CD VARCHAR(10),EFF_DT DATE); INS INTO LKP VALUES(1,'A','2013-01-01'); INS INTO LKP VALUES(1,'B','2014-01-01'); CT MAIN(EMPNO INTEGER,E...
4023 Oct 2013 @ 02:53 PDTDatabaseTopicDELETE statement taking 2 hours.Hi I have table1 with more than 20 million rows.I am trying to delete some rows based on conditions.I have written a query to delete the rows.Butit is taking almost 2 hours.Is there any other way ...
3922 Oct 2013 @ 05:00 PDTDatabaseReplyFiltering records that have overlapping datesIDW_Corporate_Service_SSR_101_b CT T3 ( ID INTEGER, STARTDATE DATE, ENDDATE DATE ) INS INTO T3 VALUES(123,'2013-01-01','2013-08-09') INS INTO T3 VALUES(123,'2013-0...
3822 Oct 2013 @ 12:02 PDTDatabaseReplyAdhoc query requestSEL T1.COL1,T1.COL2,T1.COL3,T2.COL2 FROM ( SEL  COL1,COL2,MAX(COL3) OVER(PARTITION BY COL1 ORDER BY COL3) COL3 FROM T1 ) T1 LEFT OUTER JOIN T2 ON T1.COL3 =T2.COL1  
3717 Oct 2013 @ 02:47 PDTDatabaseTopicAdhoc requestHi  I have a doubt regarding the following things in Teradata.If I have a particular table then how am i going to find the below things.Do we require a special privilege to look after these o...
3609 Oct 2013 @ 02:31 PDTDatabaseReplyHow to find a third lowest salary without RANK or TOP functionYes.Got it.Thank you.
3508 Oct 2013 @ 11:01 PDTDatabaseTopicHow to find a third lowest salary without RANK or TOP functionHi I need to find the third lowest salary without using RANK or TOP function?
3407 Oct 2013 @ 05:21 PDTDatabaseTopicAnything similar to DENSE_RANK() in OracleHi I am using TD 13.I have a scenario where I need to represent dates to a sequence.And I have multiple id's for the same date.Each date i would like to represnt a single number only. It canb...
3307 Oct 2013 @ 04:08 PDTDatabaseTopicDelete last 35 days data from the tableHi I had a table with n days of data.I need to delete last 35 days of data.My table doesnt have consecutive dates i.e. there were no loads in weekends or holidays.. Using INTERVAL command may jus...
3203 Oct 2013 @ 04:15 PDTDatabaseReplyCASE statement in SQLYes.Thank You!!
3103 Oct 2013 @ 04:01 PDTDatabaseReplyCASE statement in SQLCOALESCE(ID,'111')<>'123456'  where ID is the INTEGER.
3003 Oct 2013 @ 03:26 PDTDatabaseReplyCASE statement in SQLWhat about the below statement SELECT CASE WHEN COALESCE(111,111)='111' THEN 'YES' ELSE 'NO' END AS X It should also return NO.
2903 Oct 2013 @ 03:10 PDTDatabaseReplyCASE statement in SQLThen how to write this case to print YES for the second statement .SELECT CASE WHEN COALESCE(111,'111')='111' THEN 'YES' ELSE 'NO' END AS X  
2803 Oct 2013 @ 02:27 PDTDatabaseReplyCASE statement in SQLSEL CASE WHEN 111='111'  THEN 'YES' ELSE 'NO' END  Printing YES SELECT CASE WHEN COALESCE(111,'111')='111' THEN 'YES' ELSE '...
2703 Oct 2013 @ 02:14 PDTDatabaseReplyCASE statement in SQLSELECT CASE WHEN COALESCE(111,'111')='111' THEN 'YES' ELSE 'NO' END AS X   it is printing NO..What's the difference??
2603 Oct 2013 @ 12:16 PDTDatabaseTopicCASE statement in SQL  In both the cases,it is printing 'Yes' .Why?? sel case when 111=cast('111' as char(3)) then 'yes' else 'no' end sel case when 111='111'&...
2502 Oct 2013 @ 10:58 PDTDatabaseReplysnap to scd using sqlAs per my understanding, the updated records have CURR_IN=0 and RCV_IN=1. For active records,CURR_IN=1 and RCV_IN=1 and for deleted records CURR_IN=1 and RCV_IN=0. I have done this and strucked...

Pages