View Single Post

   
  #2 (permalink)  
Old 02-28-2008, 09:10 AM
Willem Bogaerts
 
Posts: n/a
Default Re: Problem with create procedure

> Here is what I tried.
>
> CREATE PROCEDURE 'sr19'.sp_find_food(
> IN search_string varchar(255)
> ) LANGUAGE SQL
> BEGIN
> DECLARE ss VARCHAR(257);
> SET ss = CONCAT('%',search_string,'%');
> SELECT NDB_No,Long_Desc FROM 'sr19'.food_desc WHERE Long_Desc LIKE
> ss;
> END


....

> The error message is relatively useless in that all it says is that
> there is an error in the SQL syntax used for the select statement.


I think you meant backticks for the sr19 table. But it is not a reserved
word, so omitting the single quotes would be more clear.

Best regards
--
Willem Bogaerts

Application smith
Kratz B.V.
http://www.kratz.nl/
Reply With Quote