I have been trying unsucessfully to build an oracle select statement that translates a field column (f.TextLabel) and its data values.

Ultimately, what I would like the outcome to be is to select this field column (f.TextLabel) and have its field values appear as the column headers in an excel spreadsheet.

What is unique about the problem is that f.TextLabel is a variable list for each a.AssetTag (meaning each assettag may have 1 or more text label).

Below is my sql statement. What do I need to do to solve this puzzle?

select a.AssetTag, f.TextLabel, x.ValString from amAsset a, amProduct p, amCategory c,amEmplDept e, amStock s, amLocation l, amFVAsset x, amFeature f where a.lProdID = p.lProdID and a.lCategId = c.lCategId and a.lUserId = e.lEmplDeptId and (a.lAstID = x.lAstID and x.lFeatID = f.lFeatID) and (a.lstockId = s.lstockId and s.llocaid = l.llocaid)

Thank you in advance for you help. mburbage@kpmg.com