On Feb 6, 2008 6:40 AM, Britske <[EMAIL PROTECTED]> wrote:
> SELECT * FROM prices WHERE prices.productid IN (SELECT id FROM priducts
> ORDER BY id LIMIT 0, 1000)
>
> However, I'm getting an error-message stating that Limit is not allowed in a
> subquery.
> How would you approach this?
SELECT *
FRO
Hi,
On Feb 6, 2008 6:40 AM, Britske <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm doing some clientside aggregation on rows (which represent prices )
> which sit in a huge table. I therefore want to import these rows in chunks,
> but for this aggregation code to operate correctly I need to be sure th
View this message in context:
http://www.nabble.com/workaround--%3A-Limit-in-subquery-not-allowed-tp15306494p15306494.html
Sent from the MySQL - General mailing list archive at Nabble.com.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscrib
On 17/11/2005, Peter Brodersen wrote:
> I would like to select top three from different parts in the same
> table, e.g. for the following data set:
USE test;
DROP TABLE IF EXISTS foo;
CREATE TABLE foo (
fid INT NOT NULL,
d INT NOT NULL
);
INSERT INTO foo VALUES
(1, 10), (1, 20),
Hello.
I've written a stored procedure that can help you. However, I'd like to
see a solution which will work for 4.1 as well.
Here is the results. First group is select from the original table,
second group is select from the temporary table with the results.
id value
1 10
Hi,
(mysql server 5.0.15 running under linux)
I suppose this is a classic task. I just hope MySQL 5.0 is able to give
the right result.
I would like to select top three from different parts in the same table,
e.g. for the following data set:
id,value
1,10
1,20
1,30
1,40
1,50
2,10
2,20
2,30
2,40
Hi,
I use ther version 4.1.11, and when I run this query :
SELECT c.id,c.subject,c.res_type,c.news_id,c.com_thread,c.timestamp +
0 as timestamp FROM comments c WHERE c.id IN (SELECT d.id FROM
comments d WHERE d.res_type=1 GROUP BY d.news_id ORDER BY d.id DESC
LIMIT 5 ) ORDER BY c.timestamp DESC;