NH-3586, NH-3588

Fixed Decimals with precisions larger than 18 and temporary tables.