Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to do a complete search

Status
Not open for further replies.

taree

Technical User
May 31, 2008
316
US
I have a page for our customer to search the jobs for advertised currently and works great when the use a single word. example when the search for "Bituminous" job they get the result However if they enter into the search text box like this "Bituminous and Overlay" then they do not get anything back eventhough there is an a project for Bituminous and overlay job..how can I modify my code to do such kind of search? thank you for the help


With strStringBuilder
....
.Append(" AND UPPER (get_desc (p.contid)) LIKE :curJobSearch ")
.Append(" ORDER BY l.lcontid ")
End With


Dim cmdJobSearch As OracleCommand = New OracleCommand
cmdJobSearch.Parameters.Add(":curJobSearch", OracleType.Char).Value = "%" & Trim(curJobType).ToUpper & "%"
cmdJobSearch.Connection = oOracleConn
 
You'd be best off asking in one of the Oracle Forums on how to structure your query.
 
I would guess there is an issue with the text entered into the search box.
%Bituminous and Overlay%
%Bituminous and Overlay%
%Bituminous and Overlay%
%Bituminous and Overlay%
are all different. it may be that either the data or the user input has extra spaces.

can you run the query directly from the database and get the results you want?

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
This sql code did it for me:

.Append(" AND instr(UPPER (get_desc (p.contid)) , :curJobSearch ) > 0 ")

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top