Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
haymarketpaul
Creator III
Creator III

LOAD data from each October up to 5 years ago

QV12 SR3

I need to load data that has a registration date from each October up to 5 years ago but i'm struggling to work out the where clause.

For example...

If i were to load data today (3rd September 2016) it would be from 1st October 2011

but next month being October 2016 it would load data from October 2012 onwards until...

...in October 2017 it would load data from October 2013 and so on from each October each year

Any ideas how best to accomplish this much appreciated

Brand:

LOAD

     [CMS Created Date],

     [Registration Type],

     [Registration Name]

FROM

[$(vQVDPath)QVD\BrandLevel_Data.qvd]

(qvd)

Where

//date filtering would go here ideally based on [CMS Created Date] field

;

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try something like

...

WHERE

[CMS Created Date] >= Yearstart(Today(1), -4,10);

View solution in original post

2 Replies
swuehl
MVP
MVP

Try something like

...

WHERE

[CMS Created Date] >= Yearstart(Today(1), -4,10);

haymarketpaul
Creator III
Creator III
Author

Perfect - Thank You