10 tables x 400k rows

Mhypertext

Registered User.
Local time
Yesterday, 18:46
Joined
Dec 10, 2008
Messages
29
I have 10 tables with data they are all player session tables

I have a list of games i want to compair against 144 games

the 10 tables have multiple data entries for each game and player

I need to get player data broken down by machine and points on the machine

when i try this query it returns blank

SELECT
FROM dbo_PlayerSession9 INNER JOIN (dbo_PlayerSession8 INNER JOIN (dbo_PlayerSession7 INNER JOIN (dbo_PlayerSession6 INNER JOIN (dbo_PlayerSession5 INNER JOIN (dbo_PlayerSession4 INNER JOIN (dbo_PlayerSession3 INNER JOIN (dbo_PlayerSession2 INNER JOIN (dbo_PlayerSession1 INNER JOIN ((dbo_PlayerSession0 INNER JOIN dbo_Machine_PM ON dbo_PlayerSession0.Mnum = dbo_Machine_PM.Mnum) INNER JOIN dbo_Player ON dbo_PlayerSession0.PlayerId = dbo_Player.PlayerId) ON dbo_PlayerSession1.PlayerId = dbo_Player.PlayerId) ON dbo_PlayerSession2.PlayerId = dbo_Player.PlayerId) ON dbo_PlayerSession3.PlayerId = dbo_Player.PlayerId) ON dbo_PlayerSession4.PlayerId = dbo_Player.PlayerId) ON dbo_PlayerSession5.PlayerId = dbo_Player.PlayerId) ON dbo_PlayerSession6.PlayerId = dbo_Player.PlayerId) ON dbo_PlayerSession7.PlayerId = dbo_Player.PlayerId) ON dbo_PlayerSession8.PlayerId = dbo_Player.PlayerId) ON dbo_PlayerSession9.PlayerId = dbo_Player.PlayerId;


I dont know where to start because of the volume of data in each session each one has about 400k rows X10

i just need the players that played the games and how much poins they have with is in playerday table
 
its works like this but when i add another session it goes back to blank

SELECT dbo_PlayerDay.PlayerId, dbo_PlayerDay.TripNumber, dbo_Machine_PM.Mnum, dbo_PlayerSession0.Location, dbo_Machine_PM.MFR
FROM (dbo_PlayerSession0 INNER JOIN dbo_Machine_PM ON dbo_PlayerSession0.Mnum = dbo_Machine_PM.Mnum) INNER JOIN dbo_PlayerDay ON dbo_PlayerSession0.PlayerId = dbo_PlayerDay.PlayerId;
 
i guess my question is how do i combine the 10 tables into one so i can query off that insted of 10 seperate tables
 
You'll need to create an append query for each of the tables to append to the one.
 
Alternatively if you want to keep the data seperate then you will need a union query to combine all the tables into one.

David
 
ok I have a union Query

on my sessions so i can use them all at once

now i want to run the quary against the list of players but combine all the data or add it all together instead of each player having mulitple sessions in my query view i want everything totaled up on each player

is there a way to do that
 

Users who are viewing this thread

Back
Top Bottom