|
Guest -> Search query (3/15/2001 20:44:00)
|
I am writing an sql query using the DRW as follows: SELECT * FROM employee WHERE (emp_name = '::emp_name::' OR emp_name= ") AND (project = ': roject::' OR project = ")I am also returning several other fields in the same table, while only searching by EMP_NAME and PROJECT This does not produce desired results. If I search on the emp_name and enter Smith with nothing in the project field i am returned all the Smiths. This is fine. If i just enter the project field and put in Overtime, i get all of the people working on Overtime project. If I enter Smith and Overtime I get evryone named Smith as well as everyone working on Overtime Project. What I would like to do Is to JUST get Everyone named Smith who is working on OVertime and no one else. In essence, Id like to add more search fields but just be returned the values I put into the fields, and if a filed is left blank, Id just like to search on the fields that i entered criteris into and would like to be returned values that match all fields entered. I dont want every Smith and Evere person who worked on Overtime, just the smiths who worked on overtime. Hope i made my self clear. Thanks
|
|
|
|