﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Teradata Forums / Teradata  / Teradata Advanced Analytics User Group  / date computation from weekno and a column value / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Teradata Forums</description><link>http://www.teradata.com/teradataforum/</link><webMaster>info@teradata.com</webMaster><lastBuildDate>Sat, 21 Nov 2009 19:02:42 GMT</lastBuildDate><ttl>20</ttl><item><title>date computation from weekno and a column value</title><link>http://www.teradata.com/teradataforum/Topic14417-22-1.aspx</link><description>Hi,I have a table with the following structureabcwknosun_1mon_2tue_3wed_4thu_5fri_6sat_7I 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 &amp;gt;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 2009then if Sat_7 has a value &amp;gt;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???</description><pubDate>Wed, 11 Feb 2009 14:36:32 GMT</pubDate><dc:creator>sunithapr</dc:creator></item></channel></rss>