List:General Discussion« Previous MessageNext Message »
From:Chris White Date:July 25 2006 3:00pm
Subject:Re: Stored procedures
View as plain text  
On Tuesday 25 July 2006 02:10 am, Jon wrote:
> CREATE  PROCEDURE sp_test1 (IN some_limit int)
> select * from some_table limit some_limit;
>
> and
> CREATE  PROCEDURE sp_test2 (IN some_table table)
> select * from some_table;

Well, first off with stored procedures the format is:

DELIMITER $$
CREATE PROCEDURE name (....)
BEGIN
......
END $$
DELIMITER ;

DELIMITER is done so you can use ;'s within the stored procedure.  The other 
thing too is that you're trying to select a table by a variable.  That 
doesn't quite work, and I've tried a dozen or so variations myself hoping it 
would.  You know, I'd almost LIKE someone to go "No you're wrong, you just 
need to do this..." ;)

-- 
Chris White
PHP Programmer/DBlast
Interfuel
Thread
Stored proceduresJon25 Jul
  • Re: Stored proceduresVisolve DB Team25 Jul
    • Re: Stored proceduresJon25 Jul
  • Re: Stored proceduresChris White25 Jul
    • Re: Stored proceduresJon Molin25 Jul
  • Re: Stored proceduresDevananda30 Jul
    • Re: Stored proceduresPeter Brawley30 Jul
      • Re: Stored proceduresJon31 Jul
RE: Stored proceduresDan Burke25 Jul
  • Re: Stored proceduresJon25 Jul
RE: Stored proceduresDan Burke26 Jul