I have a list of distinct values for a column "StringID": 'S00000000', 
'S00000001', S00000002'.

A FreezeTime value can have 1 to 3 rows (one row for each StringID) like this:
        FreezeTime, StringID, Po_avg_sum
        12/13/2010 22:00:00, S00000000, 76
        12/13/2010 22:00:00, S00000001, 265
        12/13/2010 22:00:00, S00000002, 195

or it could have just one or two of the StringIDs for a particular FreezeTime.

What I want to get is this:
        FreezeTime, po_S00000000, po_S00000001, po_S00000002
        12/13/2010 22:00:00, 76, 265, 195

The library I found that will do the pivot I need works fine if all three 
StringIDs are present, but if any are missing, it breaks. So what I need to do 
is insert into my list null values for Po_avg_sum for that StringID and 
FreezeTime so that my FreezeTime row would look like this:
        12/13/2010 22:00:00,76,,195

If the 'S00000001' data was missing for that time.

It's probably really easy, but I'm struggling.

-- 
Lorin Rivers
Mosasaur: Killer Technical Marketing <http://www.mosasaur.com>
<mailto:lriv...@mosasaur.com>
512/203.3198 (m)


Reply via email to