dcsimg
How to search a specific string or word in a database by using java or jsp.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   syedabdul_aleem
Posted On:   Thursday, March 29, 2001 08:56 PM

I have been trying to write a program which is used to search a specific string in a database and retrieve the results in an HTML form, but could not succeed. For ex: in any website by giving string in a search field it will searches the string in the website directory and displays the webpages containing the associated string. Likewise I would like to search in the database.

Kindly help me out by giving code as soon as possible.

Re: How to search a specific string or word in a database by using java or jsp.

Posted By:   Anonymous  
Posted On:   Friday, March 30, 2001 01:29 AM

for example if you want to search the name of an employee in the database (Eg:- table name EMP_MASTER and field name EMP_NAME )then the query will look like as below


SELECT EMP_NAME FROM EMP_MASTER WHERE EMP_NAME LIKE %(STRING)%


This will give you all the names containing the string passed as the parameter..


I hope this would solve your problem.


If you still find a problem then mail me back .. I will expalin you in detail.

About | Sitemap | Contact