file connect ( kern test sqlmode db2 !
create table t ( a date )!
insert into t values ( current date )!
pars_then_ex !
select a         +    a          into :a from t !
select a         + '00011231'    into :a from t !
 *++ 0.C05CHECK: date + 1y + 12m + 31d (to be deleted in .punix,.tpunx)!
select a         +  00011231     into :a from t !
 *++ 1.C05CHECK: date + 1 year       (to be deleted in .punix,.tpunx)!
select a         + 1 year        into :a from t !
select '00011231' +    a          into :a from t !
select '00011231' + '00011231'    into :a from t !
select '00011231' +  00011231     into :a from t !
select '00011231' + 1 year        into :a from t !
select 00011231 +    a          into :a from t !
select 00011231 + '00011231'    into :a from t !
select 00011231 +  00011231     into :a from t !
select 00011231 + 1 year        into :a from t !
 *++ 2.C05CHECK: date + 1 month      (to be deleted in .punix,.tpunx)!
select 1 month +    a          into :a from t !
select 1 month + '00011231'    into :a from t !
select 1 month +  00011231     into :a from t !
select 1 month + 1 year        into :a from t !
select a         -    a          into :a from t !
 *++ 3.C05CHECK: date - 2 y - 1 m    <date duration> is not DATE-WERT!
select a         - '00011231'    into :a from t !
 *++ 4.C05CHECK: date - 2 y - 1 m    DATE-Wert is not <date duration>!
select a         -  00011231     into :a from t !
 *++ 5.C05CHECK: date - 1 y          (to be deleted in .punix,.tpunx)!
select a         - 1 year        into :a from t !
 *++ 6.C05CHECK: -(date - 2 y - 1 m) <date duration> is not DATE-Wert!
select '00011231' -    a          into :a from t !
select '00011231' - '00011231'    into :a from t !
select '00011231' -  00011231     into :a from t !
select '00011231' - 1 year        into :a from t !
select 00011231 -    a          into :a from t !
select 00011231 - '00011231'    into :a from t !
select 00011231 -  00011231     into :a from t !
select 00011231 - 1 year        into :a from t !
select 1 month -    a          into :a from t !
select 1 month - '00011231'    into :a from t !
select 1 month -  00011231     into :a from t !
select 1 month - 1 year        into :a from t !
pars_execute !
drop table t !
create table t ( a time )!
insert into t values ( current time ) !
pars_then_ex !
select a         +    a          into :a from t !
select a         + '00011231'    into :a from t !
select a         +  00011231     into :a from t !
select a         + 10 minutes        into :a from t !
select '00011231' +    a          into :a from t !
select '00011231' + '00011231'    into :a from t !
select '00011231' +  00011231     into :a from t !
select '00011231' + 10 minutes        into :a from t !
select 00011231 +    a          into :a from t !
select 00011231 + '00011231'    into :a from t !
select 00011231 +  00011231     into :a from t !
select 00011231 + 10 minutes        into :a from t !
select 3 hours +    a          into :a from t !
select 3 hours + '00011231'    into :a from t !
select 3 hours +  00011231     into :a from t !
select 3 hours + 10 minutes        into :a from t !
select a         -    a          into :a from t !
 *++ 7.C05CHECK:   time - 1:12:31    (to be deleted in .punix,.tpunx)!
select a         - '00011231'    into :a from t !
select a         -  00011231     into :a from t !
* Fehlermeldung ML133 vom 18.10.95!
select date('19951018') - '00011231' into :a from t!
select date('19951018') -  00011231  into :a from t!
select a         - 10 minutes        into :a from t !
 *++ 8.C05CHECK: -(time - 1:12:31)   (to be deleted in .punix,.tpunx)!
select '00011231' -    a          into :a from t !
select '00011231' - '00011231'    into :a from t !
select '00011231' -  00011231     into :a from t !
select '00011231' - 10 minutes        into :a from t !
select 00011231 -    a          into :a from t !
select 00011231 - '00011231'    into :a from t !
select 00011231 -  00011231     into :a from t !
select 00011231 - 10 minutes        into :a from t !
select 3 hours -    a          into :a from t !
select 3 hours - '00011231'    into :a from t !
select 3 hours -  00011231     into :a from t !
select 3 hours - 10 minutes        into :a from t !
pars_execute !
rollback release !
file connect ( kern test !
create table t2 ( a char (20))!
pars_then_ex !
insert t2 values (date||time)!
select * into :a from t2 !
pars_execute!
rollback release !
