If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
Hi,
Im converting an oracle sql statement to db2 and we use the oracle's log function with the base 2 as an argument , in db2 the log function uses the base log or 10 as argument . my question is how can i use the base 2 (or pass the base as argument) in db2?
10x
10x a lot
i used this
CREATE FUNCTION LOG2(value float)
returns float
LANGUAGE SQL
DETERMINISTIC
NO EXTERNAL ACTION
CONTAINS SQL
return ln(value)/ln(2)@