I am trying to search for a client using name and date of birth. My query is included below.
Select *
From Client
Inner Join Address
On Client.num = Address.cl_num
Where
Client.fname LIKE ‘%john%’ and Client.sname LIKE ‘%doe%’
Or
Client.fname LIKE ‘%doe%’ and Client.sname LIKE ‘%john%’
And Client.year = 1973
And Client.month = 06
And Client.day = 05
The results however show clients who weren’t born on that day. Is there a problem with my statement?
The query is run on an iSeries server.