我无法理解以下查询的结果:
select
trim(custodian) CUST,
length(trim(custodian)) LNGTH,
ascii(trim(custodian)) ASCII,
decode(trim(custodian), null, 'EMPTY', 'NOT EMPTY') DECOD
from collateral_detail
where booking_id = '36795';
输出:
CUST LNGTH ASCII DECOD
-------- --------- --------- -----------
1 0 NOT EMPTY
使用SQL Loader,Oracle 9i数据库加载数据。
当我手动将保管人值设置为空或''时,解码将返回' EMPTY'如预期的那样。