--
-- ### String and date function tests
--

create table t1 ( a int, b string(30), c datetime, d float, e string(10));
insert into  t1 values ( 1 , 'aXXXbb', sysdate, 3.44, '42');

select b from t1;
select trim ( b, 'abc' ) from t1;

select d from t1;
select trunc ( d ) from t1;

select date2str(c, '%Y%m%d') from t1;

select int2date (date2int(c) + 60*60*24 ) from t1;

select lower(b) from t1;
select upper(b) from t1;
select left(b, 3) from t1;
select right(b, 3) from t1;
select b from t1;
select b + e from t1;
select b | e from t1;
select getpos(b, 'b') from t1;
select getpos(b, 'b', 1, 1) from t1;
select getpos(b, 'b', 1, 2) from t1;
select substr(b, 2) from t1;
select substr(b, 2, 1) from t1;
select replace(b, 'XXX', 'YYY') from t1;
select length(b) from t1;
select str2int(e) from t1;
select str2long(e) from t1;
select randstr(10) from t1;
select randint(1000) from t1;

drop table t1;
