-- Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (https://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--

CALL TRUNCATE_VALUE('Test 123', 4, FALSE);
>> Test

CALL TRUNCATE_VALUE(1234567890.123456789, 4, FALSE);
>> 1235000000

CALL TRUNCATE_VALUE(1234567890.123456789, 4, TRUE);
>> 1235000000

CALL TRUNCATE_VALUE(CAST(1234567890.123456789 AS DOUBLE PRECISION), 4, FALSE);
>> 1.2345678901234567E9

CALL TRUNCATE_VALUE(CAST(1234567890.123456789 AS DOUBLE PRECISION), 4, TRUE);
>> 1.235E9
