M
Mayhew
I have a SELECT SQL query in Access 2003 that throws the error "The field is
too small to accept the amount of data you attempted to add. Try inserting or
pasting less data." I am not inserting or pasting anything. It is a query
based on other queries, however, but I can't find why it doesn't work. Here
are the SQL statements for the queries. "Batting", "Pitching", and "Teams"
are tables, with pretty simple text and number data:
BScores:
SELECT Batting.Team, Batting.Period, Batting.Year, Sum(Batting.FPTS) AS BPTS
FROM Batting
WHERE Status='A'
GROUP BY Team, Period, Year;
PScores:
SELECT Pitching.Team, Pitching.Period, Pitching.Year, Sum(Pitching.FPTS) AS
PPTS
FROM Pitching
WHERE Status='A'
GROUP BY Year, Team, Period;
TScores:
SELECT BScores.Team, BScores.Period, BScores.Year, BScores.BPTS+PScores.PPTS
AS FPTS
FROM BScores INNER JOIN PScores ON (BScores.Team=PScores.Team) AND
(BScores.Period=PScores.Period) AND (BScores.Year=PScores.Year);
ScoreSched (this query throws the error):
SELECT TScores.Team, TScores.Period, Teams.Name
FROM TScores, Teams
WHERE TScores.Year=Teams.Year And TScores.Team=Teams.Abbr;
If I copy the data from TScores into Excel and then into a straight Access
table, the query works fine joining that table with Teams. I am hitting my
head against the wall on this, it makes no sense to me.
The only thing the error implies to me is that there is some data type
mismatch, but all the referenced data types are exactly the same, though
referenced through multiple layers of queries.
Please help!
too small to accept the amount of data you attempted to add. Try inserting or
pasting less data." I am not inserting or pasting anything. It is a query
based on other queries, however, but I can't find why it doesn't work. Here
are the SQL statements for the queries. "Batting", "Pitching", and "Teams"
are tables, with pretty simple text and number data:
BScores:
SELECT Batting.Team, Batting.Period, Batting.Year, Sum(Batting.FPTS) AS BPTS
FROM Batting
WHERE Status='A'
GROUP BY Team, Period, Year;
PScores:
SELECT Pitching.Team, Pitching.Period, Pitching.Year, Sum(Pitching.FPTS) AS
PPTS
FROM Pitching
WHERE Status='A'
GROUP BY Year, Team, Period;
TScores:
SELECT BScores.Team, BScores.Period, BScores.Year, BScores.BPTS+PScores.PPTS
AS FPTS
FROM BScores INNER JOIN PScores ON (BScores.Team=PScores.Team) AND
(BScores.Period=PScores.Period) AND (BScores.Year=PScores.Year);
ScoreSched (this query throws the error):
SELECT TScores.Team, TScores.Period, Teams.Name
FROM TScores, Teams
WHERE TScores.Year=Teams.Year And TScores.Team=Teams.Abbr;
If I copy the data from TScores into Excel and then into a straight Access
table, the query works fine joining that table with Teams. I am hitting my
head against the wall on this, it makes no sense to me.
The only thing the error implies to me is that there is some data type
mismatch, but all the referenced data types are exactly the same, though
referenced through multiple layers of queries.
Please help!