Error: Sort aborted #1028

What

Registered User.
Local time
Today, 02:13
Joined
Oct 28, 2009
Messages
14
Hello,

The database ran this same query as part of a macro that is run weekly for over three years:

SELECT tlog.Num, tlog.Uniquet, Count(tlog.Code) AS CountOfCode, Sum(tlog.Amount) AS SumOfAmount, Min(tlog.tTime) AS MinOftTime, Max(tlog.tTime) AS MaxOftTime, transacts.fValid
FROM tlog INNER JOIN transacts ON tlog.Uniquet = transacts.Uniquet
WHERE (((tlog.Date)>#1/1/2009#))
GROUP BY tlog.Num, tlog.Unique, transacts.fValid
HAVING (((transacts.fValid)=0));

Before the end of the year the query was to be modified with the current year. When a user reported a problem with the database (an error message indicating that a table didnt exist) - I looked into it and found that the query still had last years date hard coded. I intended on switching it to using dateserial instead of a hard coded date, but apparently only did so in in my test copy of the database - d'oh. So I switched it to dateserial thinking it would be smooth sailing from there.

Instead I stumbled upon this error:

ODBC--Call failed.
[MySQL][ODBC 3.51 Driver][mysqld-5.1.30-community]Sort aborted (#1028)

So I switched it back to a hard coded date, thinking there might be a problem with my syntax. And received the same error message.

Why, oh why am I getting this error? I don't believe I'm even sorting anything. It's the same code that has ran without error for years. There have been no changes to the MySQL database server (software or hardware). The MySQL server in question has ample resources, not being taxed at all. I was able to get a query that is almost the same thing to run from within the MySQL command line. (though, not identical because of access vs MySQL syntax...)

Any Help would be greatly appreciated!
 
Hello,

The database ran this same query as part of a macro that is run weekly for over three years:

SELECT tlog.Num, tlog.Uniquet, Count(tlog.Code) AS CountOfCode, Sum(tlog.Amount) AS SumOfAmount, Min(tlog.tTime) AS MinOftTime, Max(tlog.tTime) AS MaxOftTime, transacts.fValid
FROM tlog INNER JOIN transacts ON tlog.Uniquet = transacts.Uniquet
WHERE (((tlog.Date)>#1/1/2009#))
GROUP BY tlog.Num, tlog.Unique, transacts.fValid
HAVING (((transacts.fValid)=0));

Before the end of the year the query was to be modified with the current year. When a user reported a problem with the database (an error message indicating that a table didnt exist) - I looked into it and found that the query still had last years date hard coded. I intended on switching it to using dateserial instead of a hard coded date, but apparently only did so in in my test copy of the database - d'oh. So I switched it to dateserial thinking it would be smooth sailing from there.

Instead I stumbled upon this error:

ODBC--Call failed.
[MySQL][ODBC 3.51 Driver][mysqld-5.1.30-community]Sort aborted (#1028)

So I switched it back to a hard coded date, thinking there might be a problem with my syntax. And received the same error message.

Why, oh why am I getting this error? I don't believe I'm even sorting anything. It's the same code that has ran without error for years. There have been no changes to the MySQL database server (software or hardware). The MySQL server in question has ample resources, not being taxed at all. I was able to get a query that is almost the same thing to run from within the MySQL command line. (though, not identical because of access vs MySQL syntax...)

Any Help would be greatly appreciated!


The first thing I noticed was "different spellings of what appears to be the same column name.
Do you have 2 fields in tlog - Unique and Uniquet?


SELECT tlog.Num, tlog.Uniquet, Count(tlog.Code) AS CountOfCode, Sum(tlog.Amount) AS SumOfAmount, Min(tlog.tTime) AS MinOftTime, Max(tlog.tTime) AS MaxOftTime, transacts.fValid
FROM tlog INNER JOIN transacts ON tlog.Uniquet = transacts.Uniquet
WHERE (((tlog.Date)>#1/1/2009#))
GROUP BY tlog.Num, tlog.Unique, transacts.fValid
HAVING (((transacts.fValid)=0));
 
Thanks for the help! For some reason restarting the mysql daemon didnt fix the issue, but restarting the server did. I didnt think I was going to have the opportunity to restart the server for a few weeks but as chance would have it...
 

Users who are viewing this thread

Back
Top Bottom