Re: Variable for row number?

2010-03-15 Thread Pavel Gulchouck
On Sun, Mar 14, 2010 at 06:25:31PM -0400, Shawn Green writes: SG> I know it's bad form to reply to yourself but I spotted something I SG> could clarify Thank you very much, it works good enough in this case! SG> Shawn Green wrote: >> ... >> >> One way to do this is to materialize the results of

Re: Variable for row number?

2010-03-14 Thread Shawn Green
I know it's bad form to reply to yourself but I spotted something I could clarify Shawn Green wrote: ... One way to do this is to materialize the results of the ORDER BY into a temporary table with an auto_increment column defined on it. Then just do a query against the temporary table with

Re: Variable for row number?

2010-03-14 Thread Shawn Green
Pavel Gulchouck wrote: On Fri, Mar 12, 2010 at 11:37:16PM +0100, Carsten Pedersen writes: CP> Pavel Gulchouck skrev: Is there any way to get sequence row number in request? I need row number calculated before "having" but after "group by" and "order", so "select @row := @row+1" unsuitable in my

Re: Variable for row number?

2010-03-12 Thread Pavel Gulchouck
On Fri, Mar 12, 2010 at 11:37:16PM +0100, Carsten Pedersen writes: CP> Pavel Gulchouck skrev: >> Is there any way to get sequence row number in request? >> I need row number calculated before "having" but after "group by" >> and "order", so "select @row := @row+1" unsuitable in my case >> (it exec

Re: Variable for row number?

2010-03-12 Thread Carsten Pedersen
Pavel Gulchouck skrev: Hi! Is there any way to get sequence row number in request? I need row number calculated before "having" but after "group by" and "order", so "select @row := @row+1" unsuitable in my case (it executed before grouping). something along the lines of this: mysql> select *

Variable for row number?

2010-03-12 Thread Pavel Gulchouck
Hi! Is there any way to get sequence row number in request? I need row number calculated before "having" but after "group by" and "order", so "select @row := @row+1" unsuitable in my case (it executed before grouping). -- Pavel -- MySQL General Mailing List For list archives: http://lists.mys