Inserting data in a tall format

[quote=“Dravik”]Sure, he had a table that looked like this

,,,1,2,3,,,,2010-01-01 00:00:00
4,5,6,,,,,,,2010-01-01 00:00:00
,,,,,,7,8,9,2010-01-01 00:00:00

and he wanted to combine those rows into one like this

4,5,6,1,2,3,7,8,9,2010-01-01 00:00:00

We’re doing it w/ a temp table right now, but you can see where the idea of doing an insert select from the same table would have been cool :slight_smile:[/quote]

I did something like this recently. It’s a pain to do it in SQL, so I added a RawData property to the table with the SQL query to get the raw set. ie:*,*,*,1,2,3,*,*,*,2010-01-01 00:00:00 4,5,6,*,*,*,*,*,*,2010-01-01 00:00:00 *,*,*,*,*,*,7,8,9,2010-01-01 00:00:00And I added a propertyChange script that massaged the raw data into the new set and put it in the ‘data’ property of the table.

This is not elegant, but it works. One thing you have to look out for is that allowing the user to update this new row will be more work than usual.