disaggregate summarised table in SQL Server 2008
        Posted  
        
            by Karl
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Karl
        
        
        
        Published on 2010-04-09T09:42:01Z
        Indexed on 
            2010/04/09
            10:13 UTC
        
        
        Read the original article
        Hit count: 692
        
Hi
I've received data from an external source, which is in a summarised format. I need a way to disaggregate this to fit into a system I am using.
To illustrate, suppose the data I received looks like this:
receivedTable:
Age     Gender     Count
40      M          3
41      M          2
I want this is a disaggregated format like this:
systemTable:
ID      Age        Gender
1       40         M          
2       40         M 
3       40         M 
4       41         M          
5       41         M 
Thanks
Karl
© Stack Overflow or respective owner