#DateForumTypeThreadPost
6126 Jan 2016 @ 01:21 PSTDatabaseReplyHow to find out items sold by one or multiple Sellers using indicator flag?1) SELECT ITEM_ID,SELLER_ID, MAX(CASE WHEN rn = 1 THEN 'K' END)   || MAX(CASE WHEN rn = 2 THEN 'W'  ELSE '' END)   || MAX(CASE WHEN rn = 3 THEN 'WF&...
6023 Jan 2016 @ 06:53 PSTDatabaseReplyView details required for the underlying tablenameSELECT * FROM DBC.TABLES WHERE REQUESTTEXT LIKE '%TBL_NM%' AND TABLEKIND='V'; Can you try this? But I think the requesttext value chages if the table is altered.  P.S: I have...
5919 Jan 2016 @ 04:38 PSTDatabaseTopicNeed regular expression to identify recordsCan anyone help me in identifying the records of this format ########      this_is_a_record.sh      ########    I have tried many opti...
5805 Jan 2016 @ 03:48 PSTDatabaseReplySimple merging of records based on Datehttp://manibharataraju.blogspot.in/2015/07/removing-overlaps-in-records.html This should help
5705 Jan 2016 @ 03:44 PSTDatabaseReplyNeed help to implement the logicIs there any other column to identify which record is loaded first?
5623 Dec 2015 @ 01:23 PSTDatabaseReplyUpdating value from the other Date Column in Current Column in same tableUPDATE TBL FROM (SELECT ACCT_NO,SNAP_DT,MAX(SNAP_DT)OVER(PARTITION BY ACCT_NO ORDER BY SNAP_DT,SNAP_END_DT) ROWS BETWEEN 1 FOLLOWING AND 1 FOLLOWING) AS CRCTD_DT) B SET TBL.SNAP_END_DT=B.CRCTD_D...
5514 Nov 2015 @ 10:51 PSTDatabaseReplyAlternate Solution to Self JoinSELECT ID,DATE,ROW_NUMBER()OVER(PARTITION BY ID ORDER BY DATE)-1 AS COUNT FROM TBL Can u try this  
5417 Sep 2015 @ 12:18 PDTDatabaseReplyDetect and fix overlapping timestamps by their rankIn the blog i mentioned you would see that i try to calculate the previous end for the records. You can also find the previous end for all the records and then have a case when something like this ...
5315 Sep 2015 @ 10:05 PDTDatabaseReplyPlease help with date calculationCURRENT_DATE-INTERVAL '1' DAY.
5215 Sep 2015 @ 11:42 PDTDatabaseReplyRecords are getting skipped in MloadI think that is what is causing the problem. I think you can use Alpha function to get only the characters. Try it. http://datastage-tutorial.com/2011/04/how-to-remove-special-characters-data-and-...
5114 Sep 2015 @ 10:00 PDTDatabaseReplyAdd leading zero to single digit monthstrim(extract(month from date) (format '99')) try this
5014 Sep 2015 @ 09:54 PDTDatabaseReplySUBSTRING and CONCATENATIONSELECT SUBSTR(FIELD, 2,8)||SUBSTR(FIELD, 11,13) FROM DB.TABLE_NAME Try this
4914 Sep 2015 @ 09:51 PDTDatabaseReplyDetect and fix overlapping timestamps by their rankNeed more clarity on what needs to be done.Meanwhile take a look here http://manibharataraju.blo gspot.in/2015/07/removing- overlaps-in-records.html  
4814 Sep 2015 @ 12:15 PDTDatabaseReplyRecords are getting skipped in MloadCheck whether the all the constraints of the target table are met with the data you are loading.
4710 Sep 2015 @ 11:41 PDTDatabaseReplyQuery Needed to find Intersection Periods with minimum pricehttp://manibharataraju.blogspot.in/2015/07/removing-overlaps-in-records.html you might need to do some changes in the method given in my blog. Try it!! Cheers, Mani
4610 Sep 2015 @ 11:32 PDTDatabaseReplycreate table as - Failed 3706 Syntax error: expected something between ')' and the ';'.u need to give WITH DATA in the end after your select clause ends.. CREATE TABLE A AS(SEL * FROM B)WITH DATA
4510 Sep 2015 @ 11:30 PDTDatabaseReplyTeradata Update TableYou should give 1) ALIAS NAME AFTER UPDATE, 2) AFTER FROM MENTION THE TABLENAMES 3)TABLENAME.COL IN SET IS NOT REQUIRED 4)TRY TO USE ALIASES EVERYWHERE IF U HAVE CREATED ONE, SOMETIMES IT M...
4410 Sep 2015 @ 11:19 PDTDatabaseReplythe value applied to a Teradata 8 byte decimal was out of range -- 9.223372036854775808E18Cast the value to decimal(20,20) and then load
4310 Sep 2015 @ 06:59 PDTDatabaseReplyQuery neededSELECT address, Max(Postcode) MAX(CASE WHEN rownum =1 THEN age END) AS cus_id1_age, MAX(CASE WHEN rownum =2 THEN age END) AS cus_id2_age, MAX(CASE WHEN rownum =1 THEN custid END) AS cus_id1, ...
4209 Sep 2015 @ 10:36 PDTDatabaseReplyQuery needed SELECT address, Max(Postcode) -- If the postcode is not same use max else simply use Postocode and add it in group by MAX(CASE WHEN rownum =1 THEN age END) AS cus_id1_age, ...
4109 Sep 2015 @ 10:42 PDTDatabaseReplyQuery neededoops !! sorry missed the order by
4009 Sep 2015 @ 07:28 PDTDatabaseReplyQuery neededselect address, max(case when rownum =1 then age) as cus_id1_age max(case when rownum =2 then age) as cus_id2_age max(case when rownum =1 then custid) as cus_id1 max(case when rownum =2 then c...
3908 Sep 2015 @ 04:00 PDTDatabaseReplyNeed a query Generate rownumber and use Max(Case when rownumber=1 then qty) as qty 1. But do you know what is the max number of rows for a custid?
3813 Aug 2015 @ 08:41 PDTDatabaseReplyTeradata SQL Assistant ImportUsually, this error comes up when the size of SQL issued to Teradata is greater than the allowed length (1 MB). Can you check if the generated SQL is large enough to cause this error? If yes, you ...
3715 Jul 2015 @ 09:44 PDTDatabaseReplyPivot based on dateso how would you accomodate if you have july august and september entry for another bill no along with ur existing records??.. that will clarify your requirement better

Pages