I have a lastname and a firstname.
I need to be able to search for smith or smith j.
I have this in my where clause:
lastname LIKE '%SMITH%' AND firstname LIKE '%J%'
What am I doing wrong? How can I combine the lastname and the first name for one LIKE for this? The data does have a smith j in it.
Thank you for any help.
I am using Oracle 11g if that matters.
edit: forgot to include quotes. I did have that. thanks.
edit: It looks like I am doing it right so it must be something else.
Try:
Or if you really need it in one statement: