implementing search in jsp urgent!!!!
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sunil_Kumar
Posted On:   Wednesday, September 25, 2002 04:15 AM

i am implementing search in jsp which has some attributes such as textfield,combobox etc,.. i have to compare the user entered fields with database values.and then display results ..can anyone give me sample code of how to do it?
1. user enters values in search text field (just like google) with various criterias.
2.display results

thanks in advance

Re: implementing search in jsp urgent!!!!

Posted By:   Stephen_McConnell  
Posted On:   Wednesday, September 25, 2002 05:07 AM

Is the text in a large document in the database or what? Are the fields represented by a "single column" in the database. What is your database?


Your specification is vague.


If you are searching for attributes which may be in a text document in a database, DB2 and Oracle have Text Search extensions to their databases which cost beaucoup bucks; and the problem of solving this is not trivial.


If you have the fields represented by a value in a single column in a table, then your answer is in the SELECT statement in your SQL statement.


SELECT from where LIKE %%

might be a good place to start. Look up the specifics in a a book on SQL. Instant SQL might be a good book to start. It's great for beginners and intermediates alike and I use it as a simplified reference book.


Stephen McConnell