0select sum(data1)
from (0select (CASE upper(substr( 2D , rownum, 1))
WHEN A THEN 10
WHEN B THEN 11
WHEN C THEN 12
WHEN D THEN 13
WHEN E THEN 14
WHEN F THEN 15
ELSE substr( 2D , rownum, 1)
END) * power(16, length( 2D ) - rownum) data1
from dual
connect by rownum <= length( 2D )) |