Page 1 of 1

Oracle sql "case when"

PostPosted: Mon Mar 14, 2016 8:45 am
by FoxXav
Hi,

It seems that the sql syntax for Oracle case when is not implemented as I got error with query using this syntax (and not under sqldeveloper).
Is it possible to add it to the great dbeaver ?

See you

Re: Oracle sql "case when"

PostPosted: Mon Mar 14, 2016 5:32 pm
by Serge
Similar problem was fixed a couple of version ago.
Do you use recent (3.6.2) version?
Can you post an example of problem query?

Re: Oracle sql "case when"

PostPosted: Thu Mar 24, 2016 9:53 am
by FoxXav
Hi,

yes I use the latest version of dbeaver here is a request just to show the problem (no meaning in this) that didn't work in dbeaver but work in sqldeveloper :

select SUM(case when (1=0) then 1 else 0 end), SUM(case when (1=1) then 1 else 0 end)
from dual;

It seems that it's due to the use of the "case when" inside an aggregation function.
Hope it will help

See you

Re: Oracle sql "case when"

PostPosted: Thu Mar 24, 2016 10:39 am
by Serge
Yep, it is a bug in DBeaver (it incorrectly determines query end). Will fix it in the next version (3.6.3).
Thanks for report.

As a workaround you can select your query and execute it with Ctrl+enter.

Re: Oracle sql "case when"

PostPosted: Thu Mar 31, 2016 7:41 am
by FoxXav
Just try the 3.6.3 seems to work so far :-)

Great.

thank you.