I am trying to select from a table with the following structure :

```
MATERIALS 
id
shortname 
longname

```

all the lines where the long name is like the short name.

I've tried the solution presented here : [Dynamic Like Statement in SQL](https://stackoverflow.com/questions/4612282/dynamic-like-statement-in-sql)
, but it doesn't work for me.

```
SELECT * from MATERIALS where longname like (shortname + '%');

```

doesn't work in Oracle.