The blank entries will require more work. The split rows is fairly straightforward:
--INSERT INTO newTable (name, type, data)
SELECT name,
CASE
WHEN Address <> '' THEN 'Address'
WHEN Phone <> '' THEN 'Phone'
WHEN Wife <> '' THEN 'Wife'
END AS type,
CASE
WHEN Address <> '' THEN Address
WHEN Phone <> '' THEN Phone
WHEN Wife <> '' THEN Wife
END AS data
FROM startingTable
Main Topics
Browse All Topics





by: capricorn1Posted on 2008-01-18 at 12:42:04ID: 20693957
you will need vba to do this using recordset