db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-908) YEAR,SECOND,MONTH, MINUTE, HOUR and DAY functions have incorrect information on durations.
Date Sun, 25 Feb 2007 01:44:05 GMT

    [ https://issues.apache.org/jira/browse/DERBY-908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475676

Bryan Pendleton commented on DERBY-908:

I see a couple problems with the example, but I'm not sure I agree that it's clearly an example
of using a duration.

The two problems I see in the example are:
1) It says "select all classes" where I think it should say "select all rows"
2) Since the values of the MINUTE function range from 0 to 59, the values are *always* less
than 60. To find rows which are not on a full hour, I think the query should look for MINUTE()
> 0.

So I suggest the following example:

  Select all rows from the "flights" table where the "departure time" is between 6:00 and
6:30 AM:

  SELECT * FROM flights WHERE HOUR(departure_time) = 6 AND MINUTE(departure_time) < 31;

Does that example make more sense?

> YEAR,SECOND,MONTH, MINUTE, HOUR and DAY functions have incorrect information on durations.
> ------------------------------------------------------------------------------------------
>                 Key: DERBY-908
>                 URL: https://issues.apache.org/jira/browse/DERBY-908
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions:
>            Reporter: Daniel John Debrunner
>         Assigned To: Bryan Pendleton
>            Priority: Minor
>             Fix For:
>         Attachments: docChanges.diff, docChanges_v2.diff, docChanges_v3.diff, docChanges_v4.diff,
rrefdayfunc.html, rrefdayfunc.html, rrefdayfunc.html, rrefhourfunc.html, rrefhourfunc.html,
rrefhourfunc.html, rrefminutefunc.html, rrefminutefunc.html, rrefminutefunc.html, rrefmonthfunc.html,
rrefmonthfunc.html, rrefmonthfunc.html, rrefsecondfunc.html, rrefsecondfunc.html, rrefsecondfunc.html,
rrefsecondfunc.html, rrefyearfunc.html, rrefyearfunc.html, rrefyearfunc.html
> All these functions in the reference manual have a sentence like:
> (this is from DAY)
> If the argument is a time duration or timestamp duration: The result is the day part
of the value, which is an integer between -99 and 99. A nonzero result has the same sign as
the argument.
> This can be removed since Derby does not support durations. Then the surrounding text
probably needs re-work as it leaves only a single type of argument.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message