Re: MySQL says, "Ich don't think so" (Subquery woes)

2006-02-05 Thread Daniel Kasak
René Fournier wrote: Thanks! I will try this Monday. On a related note, does the 'temporary table' approach (creating, locking, dropping) significantly slow down queries? I haven't had to use them yet, and my application is somewhat performance sensitive, so... just curious. It's actually a *lo

Re: MySQL says, "Ich don't think so" (Subquery woes)

2006-02-04 Thread René Fournier
On 4-Feb-06, at 5:36 PM, Michael Stassen wrote: René Fournier wrote: SELECT MAX(id) FROM history WHERE account_id = 216 GROUP BY asset_id ...works. Returns, e.g.: 1234, 3456, 5483, 8382. SELECT history.* FROM history WHERE history.id IN (1234, 3456, 5483, 8382 ) ...works too. But if I try to co

Re: MySQL says, "Ich don't think so" (Subquery woes)

2006-02-04 Thread Michael Stassen
René Fournier wrote: SELECT MAX(id) FROM history WHERE account_id = 216 GROUP BY asset_id ...works. Returns, e.g.: 1234, 3456, 5483, 8382. SELECT history.* FROM history WHERE history.id IN (1234, 3456, 5483, 8382 ) ...works too. But if I try to combine them using a subquery, a la... SELECT

QL 4.1 or greater.Re: MySQL says, "Ich don't think so" (Subquery woes)

2006-02-04 Thread Rhino
But your query should be fine as long as you have MySQL 4.1 or later. It would certainly work in DB2, my main database. -- Rhino - Original Message - From: "René Fournier" <[EMAIL PROTECTED]> To: Sent: Saturday, February 04, 2006 5:38 PM Subject: MySQL says, "

MySQL says, "Ich don't think so" (Subquery woes)

2006-02-04 Thread René Fournier
SELECT MAX(id) FROM history WHERE account_id = 216 GROUP BY asset_id ...works. Returns, e.g.: 1234, 3456, 5483, 8382. SELECT history.* FROM history WHERE history.id IN (1234, 3456, 5483, 8382 ) ...works too. But if I try to combine them using a subquery, a la... SELECT history.* FROM history