I think I've already show how Dynamic SQL is not the answer in this case. This is a database on the same server, no need for linked servers. Once again,...
the problem is that this query returns multiple rows, the join needs to be dynamic based on what the current row is returning in the first table... maybe this isn't...
the solutions have me setting a datasource variable, what i'm trying to accomplish is that one of the selected columns (s.datasource) in the first table contains the database to be used...