Toad World® Forums

SELECT (2**31) FROM DUAL


#1

Hello,
not sure if this can be called a bug…

–> this raises an error : ORA-00936: Ausdruck fehlt (in english: expression missing)
SELECT (2**31) FROM DUAL;

–> this works fine
DECLARE
lv_int PLS_INTEGER;
BEGIN
lv_int := (-2**31);
dbms_output.put_line (lv_int);
END;

Please seek for “exponent” in :
Knowledge Xpert for PL/SQL
and see in
Table 2: Simple and Compound Symbols in PL/SQL
this: ** Double asterisk: exponentiation operator

What would you say?

Thanks
Andre


#2

Hi,
The first thing is that first statement is in SQL, the second is in the PLSQL.
In PLSQL x**y=power(x,y) in sql that syntax is not working.

Regards Piter


#3

Gosh!
Can I offtake this please :slight_smile:

Thank you Peter !

Andre