Hi,
I'm looking for a way to join a series of SQL tables based on a list of table names. The list of table names can change as the system grows but I need to make sure the join operates on all the tables as they grow.
Each table in the list will have a common column called ActivityID which is a foreign key back to the Activity table which is the source table of the join.
I'd thought about maybe creating a varchar and building the query up before executing. Is this the best way or can the join syntax be created without varchar building?