
Originally Posted by
June7
Might not be easy with that data structure.
If Table2 were like:
RecordID
MD_ID
QtrStart
DataID
DataValue
Then you could do a CROSSTAB query that groups on MD_ID and DataID and pivots on the QtrStart.
Can manipulate the table with a UNION query to get the data structured like that then run CROSSTAB on the UNION table. There is no wizard or designer for UNION, must type into the SQL View of query builder (limit of 50 lines).
SELECT RecordID, MD_ID, QuarterStartDate, DataPoint1 AS DataValue, "DP1" AS Source FROM tablename
UNION SELECT RecordID, MD_ID, QuarterStartDate, DataPoint2, "DP2" AS Source FROM tablename
...
UNION SELECT RecordID, MD_ID, QuarterStartDate, DataPoint20, "DP20" AS Source FROM tablename;
Alternative probably involves a lot of VBA code.
BTW, recommend no spaces or special characters/punctuation (underscore is exception) in any names.