--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/8e273a76-a8d8-4fe5-be43-915285b71e25n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/3b371e67-7a55-4284-a8d7-85e7c1cd2346n%40googlegroups.com.

SELECT c_bpartner_id, value, name
FROM c_bpartner
ORDER BY name2
SELECT DISTINCT c_bpartner_id, value, name
FROM c_bpartner
ORDER BY name2
SQL Error [1791] [42000]: ORA-01791: not a SELECTed expression
.Answer from Martin Schönbeck on Mattermost:
Hi, I have tried to answer the thread '01791. 00000 - "not a SELECTed expression" on a customized window info' in google groups, but my message is always deleted immediately after posting. Can anybody copy it into the group? I said:
perhaps you can solve it using the with clause
with partner as (select distinct c_bpartner_id, value, name, name2 from c_bpartner order by name2) select c_bpartner_id, value, name, name2 from partner
of course this will include name2 in the distinct clause, but I think there couldn't be no different name2 for the same c_bpartner_id.
Regards, Martin