SQL Server: Join all tables from a table listing their names I have a table that contains a list of metrics and their IDs in the format:

L6Metrics
| ID   | Name            |
--------------------------
| 734  | L6A_Velocity    |
| 736  | L6B_Velocity    |
| 738  | L6A_Target_Rate |
...


Each of these metrics has its own corresponding table containing timestamped historical data. If the metric has ID X, then its historical data's table name is History_tX. These history tables have the format:

History_t734
| DateTime                       | Value |
-----------------------------------------
| 2018-05-04 19:17:41.972 -05:00 | 33.9  |
| 2018-05-04 19:17:51.972 -05:00 | 36.3  |
| 2018-05-04 19:18:01.972 -05:00 | 35.1  |
...


Assuming that the timestamps across all of the history tables align, how can I use the L6Metrics table to join all of the history tables on DateTime to get the following:

| DateTime                       | History_t734 | History_t736 | ...
---------------------------------------------------------------- 
| 2018-05-04 19:17:41.972 -05:00 | 33.9         | 34.9         |
| 2018-05-04 19:17:51.972 -05:00 | 36.3         | 37.4         |
| 2018-05-04 19:18:01.972 -05:00 | 35.1         | 36.5         |
...


There are 75 rows in L6Metrics (representing 75 history tables) so there would be 76 columns in my result. I have the ability to modify L6Metrics if needed.
Assuming the list of Metrics.ID is static:

WITH cte AS ( SELECT DateTime FROM History_t1
              UNION
              SELECT DateTime FROM History_t2
              UNION
              ...
              UNION
              SELECT DateTime FROM History_t75
            )
SELECT cte.Datetime, 
       History_t1.value History_t1_value,
       History_t2.value History_t2_value,
       ...
       History_t75.value History_t75_value
FROM cte
LEFT JOIN History_t1 ON cte.Datetime = History_t1.datetime
LEFT JOIN History_t2 ON cte.Datetime = History_t2.datetime
...
LEFT JOIN History_t75 ON cte.Datetime = History_t75.datetime


If, as you claim, "Assuming that the timestamps across all of the history tables align" you can avoid of CTE:

SELECT History_t1.Datetime, 
       History_t1.value History_t1_value,
       History_t2.value History_t2_value,
       ...
       History_t75.value History_t75_value
FROM History_t1
LEFT JOIN History_t2 ON History_t1.Datetime = History_t2.datetime
...
LEFT JOIN History_t75 ON History_t1.Datetime = History_t75.datetime


The Metrics table not needed at all.

If the list of Metrics.ID is dynamic, use dynamic SQL to build the query text similar to above.