MySQL Forums
Forum List  »  Stored Procedures

Re: variables in WHERE
Posted by: Andrew Gilfrin
Date: March 24, 2005 02:53AM

Don't have access to MySQL at the moment but you could try and do the concat before you use it in the where clause.

something like.

create procedure find_council(IN txtin VARCAHR(50))
begin

set txtin = concat('%',txtin,'%');

select * from council where 'Council Name' like txtin;

end

Andrew Gilfrin
http://www.mysqldevelopment.com

Options: ReplyQuote


Subject
Views
Written By
Posted
4684
March 23, 2005 08:04PM
Re: variables in WHERE
2526
March 24, 2005 02:53AM
2624
March 24, 2005 07:39AM
2363
March 24, 2005 03:54PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.