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

Pre aggragation then concatenation

I have to preaggregate about 36 months separately. then bring them all together into one table (the tables have the same formats).

What is the easiest way to concatenate this many tables (ie the best scripting)?

My tables are:

Jan2012YTD

Feb2012YTD

Mar2012YTD

...and so on

1 Reply
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Assuming you know all the tables in advance...:

Data:

LOAD * INLINE [Period];

  For Each i In 'Jan2012','Feb2012','Mar2012'

  CONCATENATE

  LOAD

  '$(i)' AS Period,

  ID,

  FieldA,

  FieldB

  FROM

  D:\Scrap\LoopConcat.xlsx

  (ooxml, embedded labels, table is $(i));

  Next;

I have used an example where each table is a sheet in an Excel workbook so you'll need to adjust for your data source.

Hope this helps,

Jason