Home > other >  I have unorganized data converted to Tables on Microsoft Access, how should I approach moving the in
I have unorganized data converted to Tables on Microsoft Access, how should I approach moving the in

Time:12-15

Updated table

I have this information in Access that needs to be moved to two columns (one category, following the value) What is the most efficient way to do this? Ideally, this is how the information should be organized (output) enter image description here

How can I merge Field 1 with Field 3 and Field 5 into one column? And then merge Field 2, Field 4, and Field 6 respectfully along side their value?

This is an update on the original question as I eliminated/imported updated data to get rid of all of the fluff and left only relevant information

CodePudding user response:

A UNION query might get you close. Consider:

SELECT Field1 AS F1, Field2 AS F2 FROM StrippedData WHERE NOT Field1 IS NULL AND NOT FIELD2 IS NULL
UNION ALL SELECT Field3, Field4 FROM StrippedData WHERE NOT Field3 IS NULL AND NOT FIELD4 IS NULL
UNION ALL SELECT Field5, Field6 FROM StrippedData WHERE NOT Field5 IS NULL AND NOT FIELD6 IS NULL;

Otherwise, build a VBA procedure manipulating recordset.

  • Related