Stan P. van de Burgt Guest
|
Posted: Sun Jun 27, 1999 10:38 pm Post subject: MyODBC and MS Access: |
|
|
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
|
|