Re: function/procedure error!

2008-03-06 Thread Thufir
On Thu, 06 Mar 2008 08:05:06 -0800, puntapari wrote: > And returning a list of numbers? It can be and how? A bit tangential, but this calculation could be done recursively with ruby. Are you tied to SQL for this? -Thufir -- MySQL General Mailing List For list archives: http://lists.mysql

RE: function/procedure error!

2008-03-06 Thread Rolando Edwards
Subject: RE: function/procedure error! I have a more masochistic way to do this without a table DELIMITER $$ DROP PROCEDURE IF EXISTS `test`.`sp_NumberList` $$ CREATE PROCEDURE `test`.`sp_NumberList` (LastNumber INT) BEGIN DECLARE j INT; DECLARE SQLPiece TEXT; DECLARE SQLStmt TEXT; SET j

RE: function/procedure error!

2008-03-06 Thread Rolando Edwards
END $$ DELIMITER ; The highest you can print out is 3700. Give it a try, and have fun !!! -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 11:22 AM To: puntapari; mysql@lists.mysql.com Subject: Re: function/procedure error! At 8:05 AM -0800 3/6/0

Re: function/procedure error!

2008-03-06 Thread Paul DuBois
At 9:10 AM -0800 3/6/08, puntapari wrote: Somethin like this? DELIMITER $$ DROP PROCEDURE IF EXISTS `cantidad` $$ CREATE PROCEDURE `cantidad` (in n int ) for i in 0..n loop insert into temp values(i); end loop; select * from temp; END $$ DELIMITER ; Not quite. This will still re

Re: function/procedure error!

2008-03-06 Thread puntapari
Somethin like this? DELIMITER $$ DROP PROCEDURE IF EXISTS `cantidad` $$ CREATE PROCEDURE `cantidad` (in n int ) for i in 0..n loop insert into temp values(i); end loop; select * from temp; END $$ DELIMITER ; Thanks -- View this message in context: http://www.nabble.com/function-p

Re: function/procedure error!

2008-03-06 Thread Paul DuBois
At 8:05 AM -0800 3/6/08, puntapari wrote: Hi! And returning a list of numbers? It can be and how? You cannot return a list. You could generate a result set in a procedure, but it's returned to the client, not the caller. That's why I suggested writing the numbers into a table. Then you can s

Re: function/procedure error!

2008-03-06 Thread puntapari
Hi! And returning a list of numbers? It can be and how? Thanks -- View this message in context: http://www.nabble.com/function-procedure-error%21-tp15875760p15876992.html Sent from the MySQL - General mailing list archive at Nabble.com. -- MySQL General Mailing List For list archives: http

Re: function/procedure error!

2008-03-06 Thread Paul DuBois
At 7:48 AM -0800 3/6/08, puntapari wrote: Hi everybody! I have a little problem with one function. What i want is to make a function which returns me numbers from 0 to the number that receives the function. That can't work. A function returns a single value. Perhaps you can write a procedure