Last post Feb 27, 2017 04:51 PM by march11
Feb 17, 2017 08:53 PM|RedDragonX|LINK
I have seen a few of these threads, but I cant seem to come up with a solid solution.
I have a MySQL server with 2 instances, one running on port 4309 and one running on 4308. I need information from a single column on one of those instances but cant find a good way to make that happen. What i have is something like this:
and something like this:
And what i am hoping to end up with is something like this:
If these were 2 tables in the same DB this would have been a cakewalk, but i cant figure out how to do this in my current situation. I have tried creating 2 different DataTables with the data and merging them, but i couldnt get that to match the UserName
with the ID on every record. And i dont think there is a way to specify port numbers directly in a query, so im at a loss here.
Feb 27, 2017 04:51 PM|march11|LINK
Looks pretty simple, you just need to replace UserID with UserName, right?
Don't each of your connections strings have distinct instance names?
So you return a data table from each database.
As you loop through the table with UserIds and times. Go get the UserName from the second table where the UserIDs match.
I would probably add a column to table 1 to hold the names, then just populate that cell when the UserId matches.
You could also use the Merge option to create a new third table, then not show the columns which are not needed.