Asked by:

Query to populate Year To Date transformation table...

Question

I need to build a table that I'll use for a table based transformation.. Fort instance based on todays date I would need to have all of the dates returned from the first of the year up until today...

So the table data would look something like this..

FiscalMonth FiscalMonthYTD FiscalMonthLYYTD

201304 201301 201201

201304 201302 201202

201304 201303 201203

201304 201304 201204

201305 201301 201201

201305 201302 201202

201305 201303 201203

201305 201304 201204

201305 201305 201205

So here's how I'll be using this data, I'll link to the FiscalMonth column to my transaction date and from the FiscalMonthYTD I'll get the YTD months.. So my problem is I need a query to populate the transformation date... I've done this before but the way
I did it is escaping me..

No, I'm going to be joining to the table with the current FiscalMonth and qualifying FiscalMonthYTD against the transaction detail so I get the Year To Date summary... So I need to put together some SQL to load my table..

Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.