3 Replies Latest reply: Jun 20, 2013 9:29 AM by Ralph Graham RSS

    Combining numerous fields into one

      Hello,

       

      I am extracting data from a SQL database and am wanting to combine a number of fields into one, which would have to be grouped by a period (see Table1 below). The below shows a forecast quantity per week for each product and rather than having a seperate field per week I want to combine them and then create a new field which would now be the week (e.g. Table2). The problem I have is that the database has data from 2000 up until 2015, and this will continue to expand over time, and my initial solution of concatenating a week at a time would not be sustainable or efficient.

       

      Thanks,

       

      Ralph

       

      Table1:

       

      ProductRegion201335201336201337201338201339201340201341201342
      ChickenUK3035303414354021
      EggsUK400400500350400300450140
      BeefUS3555555560234534

       

       

      Table2:

       

      ProductRegionWeekQuantity
      ChickenUK20133530
      EggsUK201335400
      BeefUS20133535
      ChickenUK20133635
      EggsUK201336400
      BeefUS20133655
      ChickenUK20133730
      EggsUK201337500
      BeefUS20133755