Uploaded image for project: 'Apache Trafodion'
  1. Apache Trafodion
  2. TRAFODION-2582

Two timestamp minus and cannot cast to interval value

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1-incubating
    • Fix Version/s: any
    • Component/s: sql-cmp
    • Labels:
      None

      Description

      SQL>select cast((timestamp'2017-04-06 11:50:00' - timestamp'2017-04-06 11:45:00') as interval second) from (values(1));

      (EXPR)
      ----------
      0.000000

      — 1 row(s) selected.

      SQL>select cast((timestamp'2017-04-06 11:50:00' - timestamp'2017-04-06 11:45:00') as interval minute) from (values(1));

      (EXPR)
      ------
      0

      >>select timestamp'2017-04-06 11:50:00' - timestamp'2017-04-03 11:45:00' from dual;

      (EXPR)
      -------------

      3

      — 1 row(s) selected.

        Attachments

          Activity

            People

            • Assignee:
              anoopsharma Anoop Sharma
              Reporter:
              Yuan_Liu Yuan Liu
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: