#DateForumTypeThreadPost
3714 Apr 2009 @ 07:08 PDTDatabaseReplyTruncating character columnIf the first 8 characters are always alphabets why can't you do a substr(field,9)
3619 Mar 2009 @ 05:42 PDTDatabaseReplyComputing week in TeradataI have changed the query as follows and it does work nowSEL CAST ('2009-03-18' as date) - (DAY_OF_WEEK+6),cast('2009-03-18' as date) - (DAY_OF_WEEK)FROM sys_calendar.calendarWHERE calendar_date='20...
3519 Mar 2009 @ 03:34 PDTDatabaseReplyComputing week in TeradataIf i use the above query, the year part is not computed properly.Here are the resultsStartDt EndDt 03/08/3909 03/14/3909
3416 Mar 2009 @ 03:58 PDTDatabaseReplyComputing week in TeradataI did it the following way.Is there anything wrong with what i am doing below?Is there a better way guys?select *from Table1inner join (select max(dt1) as dt1,max(dt2) as dt2 from(select calendar_d...
3316 Mar 2009 @ 03:32 PDTDatabaseTopicComputing week in TeradataHi,I want to create a scheduled process that can select data for the prior week.Week for the purpose of this process is defined as Last Saturday to last to last Sunday.Example if i am running the e...
3209 Jan 2009 @ 11:43 PSTDatabaseReplyTricky Date ManipulationThank You so much Dieter.It works great.
3102 Jan 2009 @ 02:21 PSTDatabaseReplyTricky Date ManipulationGuys any clue on how we can do this ?
3031 Dec 2008 @ 11:00 PSTDatabaseTopicTricky Date ManipulationHi,I have 2 tables Pay Records and Emp Records . I want to join these 2 tables and find Payroll Details alongwith Employee Info i.e PayDt,PayNo,PayAmt,EmpNo,Name,ActiveInd,StartDt,EndDatePay Record...
2919 May 2008 @ 11:56 PDTDatabaseReplyParsing a row to create multiple rowsrgs ,Can i pass the result to a another query. I do not want to use BTEQ.Any options.Thanks,Sam
2819 May 2008 @ 10:47 PDTDatabaseReplyParsing a row to create multiple rowsThank You rgs!
2715 May 2008 @ 11:54 PDTDatabaseReplyFinding Continuos SpanThank You guys
2615 May 2008 @ 11:52 PDTDatabaseTopicParsing a row to create multiple rowsHi,I have a row which has data in the following format'600-1,300-2,500-5,600-7'I need to parse these based on , and created multiple rows. In the above example it should return600-1300-2500-5600-7P...
2510 Mar 2008 @ 05:24 PDTDatabaseTopicDate DifferenceHi,I want to find difference between 2 date fields and only select it if the difference is greater than 3 yearsExampleDt1 = 01/01/2003Dt2 = 01/01/2007Difference is greater than 3 yearsDt1 = 02/01/2...
2406 Mar 2008 @ 04:04 PSTDatabaseTopicFinding Continuos SpanHi,I have a table with the following data.I want to find the emp nbr's start date and end date.If there is a gap in span which exceeds more than 3 years than i want to find the most continuos spanI...
2306 Mar 2008 @ 02:04 PSTDatabaseReplyLeap Year and Interval FunctionThank You so much!
2206 Mar 2008 @ 11:10 PSTDatabaseTopicLeap Year and Interval FunctionHi,I have a query which runs on a monthly basis taking into account the last day of previous month and substracting 65 years from it.This month when the query ran , the last day of the previous mon...
2124 Sep 2007 @ 04:07 PDTDatabaseReplyAge CalculationThat workedThanks!
2024 Sep 2007 @ 12:33 PDTDatabaseReplyAge CalculationIt works when i do thisselect ( cast('2002-01-01' as date) - cast('2000-05-01' as date)) year as abcHowever when i query the actual table it errors out saying "Interval field overflow"
1922 Sep 2007 @ 04:12 PDTDatabaseTopicAge CalculationHi,I want to find difference between 2 dates and calculate age of the person in yearsExample1) DOB = 11/29/2001 Current Date = 1/1/2002 = 0 year2) DOB = 11/29/2001 Current Date = 12/1/2002 ...
1804 Sep 2007 @ 07:59 PDTDatabaseTopicCharacter to Date & Date DifferenceHi,I need to convert a character field(Field A) to a date field and then subtract it with a another date field(Field B) which is in date formatField A - 060725 to be converted as '2006-07-25'Field...
1729 Jun 2007 @ 04:20 PDTDatabaseReplySample without duplicatesThanks a lot guys!That did work perfectly as required.Sorry for the late replySam
1621 Jun 2007 @ 03:07 PDTDatabaseReplySample without duplicatesHi Dieter,This solution you gave does not work ok.I tried it and got these results which is not ok EMPNO DEPNO 4 30 3 20 5 20Deptno 20 is getting repeated.Sam
1520 Jun 2007 @ 04:37 PDTDatabaseTopicSample without duplicatesHi,I have a table which has records as followsEmpNo DepNo1 102 103 204 305 206 40I want to select a random sample of 3 records from the table , however i should not sele...
1410 May 2007 @ 10:22 PDTDatabaseReplyYear and Month MaxThanks Barry and DieterSam
1309 May 2007 @ 02:05 PDTDatabaseTopicYear and Month MaxHi,I have a table abc with data in the following formatYr Mon Value2006 2 1002006 2 102006 4 302006 5 152007 1 202007 1 152007 2 302007 2 45Yr...

Pages