in reply to Transposing rows to columns

I'm having difficulty understanding your desired output. Test shows dates 12/10/14 and 8/1/14 for id 1 whereas in the input data 8/1/14 is for id 2

How many records are there in the input and is the data sorted in any way ?

poj

Replies are listed 'Best First'.
Re^2: Transposing rows to columns
by simak29 (Novice) on Dec 18, 2014 at 19:59 UTC
    Thanks for responding. 8/1/14 is for both Tests 1 and 2. There are about 1M+ records....
      Hmm, one million records is relatively big, but not really something huge by today's criteria (although it depends also on the size of the records, obviously, and on your hardware). And it is likely to fit into a hash. And a hash in memory is very likely to be at least 100 times more efficient than a SQL database. In other words, use a database if you really have to, use hashes (or nested hashes or other composite data structure in memory, whatever) if you can.