date computation from weekno and a column value
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


date computation from weekno and a column... Expand / Collapse
Author
Message
Posted 2/11/2009 2:36:32 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/1/2009 8:50:13 PM
Posts: 6, Visits: 15
Hi,

I have a table with the following structure
a
b
c
wkno
sun_1
mon_2
tue_3
wed_4
thu_5
fri_6
sat_7

I need to select abc for a particular date but don't have column that would specify the date. It just a weekno and split up of days. Based on the column value for sun_1,mon_2,tue_3,wed_4,thu_5,fri_6, sat_7 i need to frmulate the date.

For example if i have a value >0 for any of the days then the weekno+the day(sun_1 for ex) will give a date.

For example weekno 10000 indicates 1 week of 2009
then if Sat_7 has a value >0 the date would be 3-Jan-2009.

How do i write a sql to do this? Also i would have tod o this for a 200 million rows so the performance is also a major consideration. Is there any function that could do this???
Post #14417
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 2:09am

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.047. 5 queries. Compression Disabled.