Hello to all,
I'm started to discover Db2 just a week ago, so I'm a very Dummy user

!!
I've got experience on Oracle but DB2 have some rilevant differences!!
Ok the problem:
Db2 version 8 (?) on z/Os
Can I use complex statement in a function like that:
create function int2Time (intTime integer )
RETURNS time
LANGUAGE SQL
DETERMINISTIC NO EXTERNAL ACTION
begin atomic
declare char_time char(6);
declare char_time_separated char(8)
char_time := cast ( intTime as char);
return_time: = substr( char_time, 1, 2 )
|| ':' || substr( char_time, 3, 2 )
|| ':' || substr( char_time, 5, 2 ) ;
return cast(char_time_separated as time)
end;
Thanks!!!
Bay!