Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-4106

The Reference Gulde claims that the INTEGER function can be applied to dates and times

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.4.2.0
    • 10.6.1.0
    • Documentation
    • None
    • MS Windows XP Professional Version 2002 Service Pack 2, running NetBeans IDE 6.5
    • Normal

    Description

      When Derby Reference Manual, version 10.4, explains the INTEGER function is said that:

      "The INTEGER function returns an integer representation of a number, character string,
      DATE, or time in the form of an integer constant"

      But when I try to convert a DATE to INTEGER I receive an sqlstate 42846: "Cannot convert types 'DATE' to 'INTEGER'."

      This is a sample query where the expected result is the integer number 1:

      select integer(date(1)) from SYSIBM.SYSDUMMY1

      Attachments

        1. docs.diff
          0.8 kB
          Bryan Pendleton
        2. rrefbuiltinteger.html
          4 kB
          Bryan Pendleton

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            bryanpendleton Bryan Pendleton
            nelsonr Nelson Rodrigues
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment