I've got a table structure with 2 tables

a table person like this:

```
id name etc.   
1  test   
2  smith  
3  shaw

```

and a second table personhist where I document the changes on the names like this: so if someone changed his name because he married or something like this I still got the old name.

```
id personid name    etc.
1     1     oldtest

```

Now I have the following query

```
select * from person p
Left join personhist ph on p.id = ph.personid
where (upper(p.name) = upper('oldtest') or upper(ph.name) like upper('oldtest'));

```

This query will result in the following result

```
id name    id personid name
1  test    1  1        oldtest

```

But I'd like to have only the actual name result. So the question is: is there a way to only show data from the "main" table also if there is a record in the table I join?