After working with UDT - User Defined Tables - which is now call Form and List in DNN V5.0+, I was looking for a way to convert the UDT into a conventional table. By convention table, I mean a table with multiple data column and a single row per data item. UDT have simple structure that places one field per data item on a row, so if you have 10 data fields then the UDT will have 10 rows per data item. Compounding the issue is the there is only one UserDefinedTableData table.
Having developed a strong reporting module - SQLGridSelectedView (aka SGSV) - I wanted to be able to access the data in a UDT. To do this I created a stored procedure that would generate the appropriate T-SQL and then execute it to return the flatten data. The flatten data has one row per data item and a column for each data field. So, instead of 10 rows per data item I have one row with 10 columns.