My requirement is to fetch only those records for which Department is D01 and Proeject is ABC.
This data may keep on varying. For next record I may have Empno = ABC123 and Project = ABN and other fields as spaces ..this way various combinations is possible.
Now I am trying to use below query :
Select Department , Salary , EmpNo , Project from Employee
(Department = 'Valid value ' or Department > Spaces ) and
(Salary = 'Valid Value ' or Salary > Spaces ) and
(Empno ='Valid Value ' or Empno > spaces) and
(Project =' Valid Value ' or Project > spaces) ;
Above query is fetching all the records instead of fetching records on specific data present in host variables.
Can anyone please suggest a way to fullfill this requirement.