Dmitri Pissarenko wrote:
On 7/18/07, Raymond Kroeker [EMAIL PROTECTED] wrote:
Can I ask why you wouldn't store the duration as a simple bigint
representing the number of seconds/milliseconds?
This field must have time type because a report is based on it. The
report is done with Crystal
-Original Message-
From: Mark Thornton [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 19, 2007 2:38 AM
To: Derby Discussion
Subject: Re: Sum of time
Dmitri Pissarenko wrote:
On 7/18/07, Raymond Kroeker [EMAIL PROTECTED] wrote:
Can I ask why you wouldn't store the duration
Hello!
SELECT PLACE, SUM(SECOND(DURATION) +
MINUTE(DURATION)*60 + HOUR(DURATION)*60*60)
FROM MyTable
GROUP BY PLACE
But I still need to convert int to time.
Out of curiosity, what happens if you add this int to the Time 00:00:00?
I don't add this int to any Time. That won't work.
Can I ask why you wouldn't store the duration as a simple bigint
representing the number of seconds/milliseconds?
On 7/18/07, Dmitri Pissarenko [EMAIL PROTECTED] wrote:
Hello!
SELECT PLACE, SUM(SECOND(DURATION) +
MINUTE(DURATION)*60 + HOUR(DURATION)*60*60)
FROM MyTable
GROUP BY PLACE
On 7/18/07, Raymond Kroeker [EMAIL PROTECTED] wrote:
Can I ask why you wouldn't store the duration as a simple bigint
representing the number of seconds/milliseconds?
This field must have time type because a report is based on it. The
report is done with Crystal Reports and I need the duration
Hello!
I have a table with with time fields. That is, each record has
a) field place (string) and
b) field duration (time).
I want to run a query like this
SELECT PLACE, SUM(DURATION)
FROM MyTable
GROUP BY PLACE
But I'm getting following error message:
SQL State = 42Y22 SQL Code = 3 SQL
Well, first of all:
what do you expect as a value for (Date)A + (Date)B ?
What you want is an interval (perhaps in seconds) instead of time as
duration.
p.
On 17.7.2007, at 9:57, Dmitri Pissarenko wrote:
Hello!
I have a table with with time fields. That is, each record has
a) field
Maybe easiest way is use big int type in duration field and store duration
time in milliseconds
-Original Message-
From: Dmitri Pissarenko [mailto:[EMAIL PROTECTED]
Sent: 17. heinäkuuta 2007 11:08
To: Derby Discussion
Subject: Re: Sum of time
Hello!
On 7/17/07, Peter Ondruska [EMAIL
On Tuesday 17 July 2007 18:03:43 Dmitri Pissarenko wrote:
Hello!
One obvious way is to use this:
SELECT PLACE, SUM(SECOND(DURATION) +
MINUTE(DURATION)*60 + HOUR(DURATION)*60*60)
FROM MyTable
GROUP BY PLACE
But I still need to convert int to time.
Out of curiosity, what happens if you