searching data using sql query

I have a simple sql query where I am trying to allow my employees to have the ability to search for other employees in my db. I want them to be able to search by both, or either first/last name. I have this, but it’s not working.

 var selectEmployee = "select * from employees where UPPER(FIRSTNAME, LASTNAME) LIKE UPPER('%" + + "%')" 

so how would I search through both first and last name using the value I am passing back?


54 thoughts on “searching data using sql query”

Leave a Comment