cast interval

Database
Enthusiast

cast interval

Hi, i have two timestamp columns of 2 fractional seconds precision,

i want to take the difference of these 2 timestamps and then have interval upto 0 fractional seconds only

For 2 fractional seconds Interval:

select (current_timestamp(2) - current_timestamp(2)) HOUR(3) TO SECOND(2);

returns    0:00:00.00

However, when i do the following for 0 fractional seconds Interval:

select (current_timestamp(2) - current_timestamp(2)) HOUR(3) TO SECOND(0);

it throws the error: 7453: Interval field overflow

I don't want to change the source timestamp precision before the difference, after difference i want to discard the fractional seconds in the Interval value. The target interval column doesn't accept fractional seconds

How to make this work?

Thanks,

-srinivas yelamanchili