MySQLTalk.org Forum Index MySQLTalk.org
MYSQL discussions groups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MyODBC and MS Access:

 
Post new topic   Reply to topic    MySQLTalk.org Forum Index -> MySQL ODBC
View previous topic :: View next topic  
Author Message
Stan P. van de Burgt
Guest





PostPosted: Sun Jun 27, 1999 10:38 pm    Post subject: MyODBC and MS Access: Reply with quote



Hi all

Sometimes, I would like to ORDER BY or GROUP BY an agregate function, like
COUNT(),
In those cases MS access creates a "ORDER BY Count(*)" clause that MySQL
doesn't like at all

Example: this works in MySQL:

select item.catid, cat.path, count(*) as n
from item,cat
where item.catid=cat.id
group by item.catid
order by n desc;

By MS Access transforms that into:
SELECT item.catid, cat.path, Count(*) AS n
FROM item INNER JOIN cat ON item.catid = cat.id
GROUP BY item.catid, cat.path
ORDER BY Count(*) DESC;

Then I tried to do it by making a Pass Thru query. When I set a query to
'pass thru' and then open it, it always brings up a data sources dialog
box. Does anyone know how to link it to the remote MySQL database, so it
doesn't ask for that again?

- Stan


--
Stan P. van de Burgt [email]stan (AT) dmo (DOT) com[/email] (0x853296C5)
DMO, P.O. box 1248, 3500 AE, Utrecht, the Netherlands
Back to top
Display posts from previous:   
Post new topic   Reply to topic    MySQLTalk.org Forum Index -> MySQL ODBC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.