Re: Retrieving a numeric series from a SELECT

2002-02-13 Thread José Angel Blanco Linares
Hi, Fellows! Sorry for my poor english. Thats why I can explain myself properly. :- ) What I really want is a calculate column with consecutive numbers from to , where can be any number, and depending on the result of the WHERE clause. I need to print pay orders for students, this pay order

Re: Retrieving a numeric series from a SELECT

2002-02-12 Thread Anvar Hussain K.M.
Hi, If you have a table with at least the number of rows that you want in your series you can do this. Set @Colnum := 0; Select @Colnum := @colnum+1 as colnum from tablename limit (number of rows required); set @column := 0; If you want a series starting from a value other than 1, initialize

Retrieving a numeric series from a SELECT

2002-02-12 Thread José Angel Blanco Linares
Hi, everybody How can I get a numeric column from a SQL SELECT statement? I mean, with a SELECT get something like this ColNum or ColNum 1 10 2 11 3 12 4 13 5 14 6 15 ... ... Some time ago, someb

Re: Retrieving a numeric series from a SELECT

2002-02-08 Thread José Angel Blanco Linares
Hi, Fellows! Sorry for my poor english. Thats why I can explain myself properly. :- ) What I really want is a calculate column with consecutive numbers from to , where can be any number, and depending on the result of the WHERE clause. I need to print pay orders for students, this pay order

Re: Retrieving a numeric series from a SELECT

2002-02-08 Thread Anvar Hussain K.M.
Hi, If you have a table with at least the number of rows that you want in your series you can do this. Set @Colnum := 0; Select @Colnum := @colnum+1 as colnum from tablename limit (number of rows required); set @column := 0; If you want a series starting from a value other than 1, initialize

Re: Retrieving a numeric series from a SELECT

2002-02-08 Thread Paul DuBois
At 15:08 -0600 2/8/02, José Angel Blanco Linares wrote: >Hi, everybody > >How can I get a numeric column from a SQL SELECT statement? >I mean, with a SELECT get something like this > >ColNum or ColNum > 1 10 > 2 11 > 3 12 > 4 13 > 5

Retrieving a numeric series from a SELECT

2002-02-08 Thread José Angel Blanco Linares
Hi, everybody How can I get a numeric column from a SQL SELECT statement? I mean, with a SELECT get something like this ColNum or ColNum 1 10 2 11 3 12 4 13 5 14 6 15 ... ... Some time ago, someb