Re: date + interval: How ??
Posted in 2000
Shouldn't duration be an INTERVAL ?
Then, you could just: select (start_time + duration) ...
>>> "Loven, Isaac" <Isaac.Loven@team.telstra.com> 08/16/00 09:44am >>>
Help Please !!
I created a table test_tb and inserted one row of data as shown below.
How do I calculate the end_time ??????????
(If I can get the select working below than I will change it into an update
statement .)
After speeding about 4 hours of RTFM ( all 3 sql manuals ) , searching the
faq of
of this group (IIUG ) and trying many many many different syntax
combinations, I am ready to pull my
hair out :-(
_________________________________________________________
create table test_tb
(
start_time datetime year to second,
duration datetime hour to second,
end_time datetime year to second
);_________________________________________________________
select * from test_tb
start_time 2000-07-17 21:15:00
duration 01:35:00
end_time
1 row(s) retrieved.
_________________________________________________________
This bellow does not work:
_________________________________________________________
select
datetime ( start_time ) year to second + interval(duration) hour to second
from test_tmp;
Database selected.
201: A syntax error has occurred.
Error in line 2
Near character position 39
Database closed.
( It does not like the plus )
How should I do this start_time + duration calculation ?????????
Thanks,
Isaac
______________________________
Isaac Loven.