Hi

I need to trim this area value which may contain spaces around this.

But it provides "not a selected expression" error, can anyone know what i did wrongly.

And i've attached the error snap here.

Thanks in advance...




Solution

Hi,

I'm no expert in Oracle, but according to this (https://stackoverflow.com/questions/31691470/ora-01791-not-a-selected-expression), the problem is that you are using an ORDER BY with attribute AREA, but you don't have it in the SELECT (because it is inside the trim).

Try to replace the ORDER BY of the attribute by the ORDER BY of the trim (exactly like in the SELECT).

Cheers.

Solution