Click here to Skip to main content
15,905,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi..
there is a problem to search any data from any table using like query ..
anybody is there for helping me..
thank you ..


my code is looks like as..
DELIMITER $$

USE `codes`$$

DROP PROCEDURE IF EXISTS `Searchcodes`$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `Searchcodes`(searchtext VARCHAR(50))
BEGIN
SELECT * FROM icd9diagnosis WHERE ICD9DiagnosisCodes LIKE '%searchtext%' ;
END$$

DELIMITER ;
CALL Searchcodes('0010');
Posted
Updated 15-Oct-13 6:23am
v2
Comments
ravitejsrivastava 15-Oct-13 12:31pm    
there is an error occur ...i want this solution in mysql
ravitejsrivastava 15-Oct-13 12:33pm    
i tried this query but this give an error..i think this query use in SQL not in mysql

Try:
SQL
SELECT * FROM icd9diagnosis WHERE ICD9DiagnosisCodes LIKE '%' + searchtext + '%' ;
 
Share this answer
 
there is an error ...i want this solution in mysql
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900