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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PreparedStatement Query(JSP)

Status
Not open for further replies.

webmast

Programmer
Dec 21, 2001
57
IN
Hi,

have a query like this:

PreparedStatement stmt = con.prepareStatement("SELECT

donor_last_name,donor_middle_name,donor_first_name,donor_height,donor_sex,donor_race,donor_dob,donor_ssn from PCMSP_DONOR where donor_last_name like '?*' ");
stmt.setString(1,l_name);
rs=stmt.executeQuery();
if(rs.next()){
out.println(rs.getString("donor_last_name"));
}

How can I join the placeholder and '*' operator in a like search?


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top