Forum Discussion
Access freezes when creating this specific table
Thanks for your reply.
I don't want to union any data together into the same column though. What I'm trying to do is create a new table with columns drawn from multiple sources, none of these columns will merge data, they will be a separate column in a new table.
However, I want this new column to include data where ID's match the 2022 ID and other conditions.
Here's a simplified version of what I'm trying to achieve.
This is what I have:
2022 Table
PlayerID
GamesPlayed
Points
2021 Table
PlayerID
GamesPlayed
Points
2020 Table
PlayerID
GamesPlayed
Points
I want to create a new table as such:
Combined Table
PlayerID
2022Points (Where 2022GamesPlayed>=5)
2021Points (WHERE 2021PlayerID = 2022PlayerID AND 2022GamesPlayed>=5 AND 2021GamesPlayed>=5)
2020Points (WHERE 2020PlayerID = 2022PlayerID AND 2022GamesPlayed>=5 AND 2020GamesPlayed>=5)
In other words I want one row for each player with historical data based on the number of games they've played in the current season and the season that data is being pulled from. They don't need to have played 5 games in every season, only the current season and historical season in question.
I'm not very experienced with SQL and there may be another way to do this that I'm not seeing.
Cheers