37 | 14 Apr 2009 @ 07:08 PDT | Database | Reply | Truncating character column | If the first 8 characters are always alphabets why can't you do a substr(field,9) |
36 | 19 Mar 2009 @ 05:42 PDT | Database | Reply | Computing week in Teradata | I 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... |
35 | 19 Mar 2009 @ 03:34 PDT | Database | Reply | Computing week in Teradata | If i use the above query, the year part is not computed properly.Here are the resultsStartDt EndDt 03/08/3909 03/14/3909 |
34 | 16 Mar 2009 @ 03:58 PDT | Database | Reply | Computing week in Teradata | I 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... |
33 | 16 Mar 2009 @ 03:32 PDT | Database | Topic | Computing week in Teradata | Hi,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... |
32 | 09 Jan 2009 @ 11:43 PST | Database | Reply | Tricky Date Manipulation | Thank You so much Dieter.It works great. |
31 | 02 Jan 2009 @ 02:21 PST | Database | Reply | Tricky Date Manipulation | Guys any clue on how we can do this ? |
30 | 31 Dec 2008 @ 11:00 PST | Database | Topic | Tricky Date Manipulation | Hi,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... |
29 | 19 May 2008 @ 11:56 PDT | Database | Reply | Parsing a row to create multiple rows | rgs ,Can i pass the result to a another query. I do not want to use BTEQ.Any options.Thanks,Sam |
28 | 19 May 2008 @ 10:47 PDT | Database | Reply | Parsing a row to create multiple rows | Thank You rgs! |
27 | 15 May 2008 @ 11:54 PDT | Database | Reply | Finding Continuos Span | Thank You guys |
26 | 15 May 2008 @ 11:52 PDT | Database | Topic | Parsing a row to create multiple rows | Hi,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... |
25 | 10 Mar 2008 @ 05:24 PDT | Database | Topic | Date Difference | Hi,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... |
24 | 06 Mar 2008 @ 04:04 PST | Database | Topic | Finding Continuos Span | Hi,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... |
23 | 06 Mar 2008 @ 02:04 PST | Database | Reply | Leap Year and Interval Function | Thank You so much! |
22 | 06 Mar 2008 @ 11:10 PST | Database | Topic | Leap Year and Interval Function | Hi,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... |
21 | 24 Sep 2007 @ 04:07 PDT | Database | Reply | Age Calculation | That workedThanks! |
20 | 24 Sep 2007 @ 12:33 PDT | Database | Reply | Age Calculation | It 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" |
19 | 22 Sep 2007 @ 04:12 PDT | Database | Topic | Age Calculation | Hi,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 ... |
18 | 04 Sep 2007 @ 07:59 PDT | Database | Topic | Character to Date & Date Difference | Hi,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... |
17 | 29 Jun 2007 @ 04:20 PDT | Database | Reply | Sample without duplicates | Thanks a lot guys!That did work perfectly as required.Sorry for the late replySam |
16 | 21 Jun 2007 @ 03:07 PDT | Database | Reply | Sample without duplicates | Hi 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 |
15 | 20 Jun 2007 @ 04:37 PDT | Database | Topic | Sample without duplicates | Hi,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... |
14 | 10 May 2007 @ 10:22 PDT | Database | Reply | Year and Month Max | Thanks Barry and DieterSam |
13 | 09 May 2007 @ 02:05 PDT | Database | Topic | Year and Month Max | Hi,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... |