|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 8/13/2009 3:26:31 PM
Posts: 4,
Visits: 10
|
|
Hello there,
I am encountering an error when I am trying to perform average function on a field with data type of time(0).
For example:
sel avg(end_time)
from table1
It gave error "5407: Invalid operation on an ANSI Datatime or Interval value"
I tried:
sel sum(end_time)/count(end_time)
from table1
This failed with the same error message due to the sum function.
Has anyone encountered this problem before? If so, can someone be kindly offer a solution to this?
Thanks in advanced,
N
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 10/8/2009 3:58:35 AM
Posts: 1,
Visits: 1
|
|
Hi
I tried following and i am getting the result.
create table time_test
(
t1 time
)primary index(t1);
insert into d_temp_hutch.time_test('12:00');
insert into d_temp_hutch.time_test('14:00');
insert into d_temp_hutch.time_test('18:00');
sel avg(t1)
from d_temp_hutch.time_test;
Average(t1)
00:14:66
Regards
Nehal
|
|
|
|