Uploaded image for project: 'Engineering'
  1. Engineering
  2. ENG-10031

in sqlcmd, stored procedure with specific timestamp forms fail with 'Unparseable date:'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: V6.1
    • Fix Version/s: V6.4
    • Component/s: Core
    • Team Backlog:
      CORE team
    • Release Note:
      Hide
      Previously, sqlcmd did not accept certain string values as TIMESTAMP arguments to procedure invocations that are valid in ad hoc SQL. For example, string arguments with only a date portion (2015-11-11) or a time without fractional seconds (2015-11-11 00:00:00) would return an error as an "unparseable date". This issue has been resolved.
      Show
      Previously, sqlcmd did not accept certain string values as TIMESTAMP arguments to procedure invocations that are valid in ad hoc SQL. For example, string arguments with only a date portion (2015-11-11) or a time without fractional seconds (2015-11-11 00:00:00) would return an error as an "unparseable date". This issue has been resolved.
    • Sprint:
      core77, core78, core79, core80, core81

      Description

      Forms of timestamp that fail via '<table>.insert' but succeed with 'insert into':
      '2015-11-11 00:00:00'
      '2015-11-11'

      1. reproducer
        1> create table foo ( a timestamp );
        Command succeeded.
        2> insert into FOO values ('2015-11-11 00:00:00.000000');
        (Returned 1 rows in 0.01s)
        3> insert into FOO values ('2015-11-11 00:00:00.0');
        (Returned 1 rows in 0.01s)
        4> insert into FOO values ('2015-11-11 00:00:00');
        (Returned 1 rows in 0.01s)
        5> insert into FOO values ('2015-11-11');
        (Returned 1 rows in 0.01s)
        6> exec FOO.insert '2015-11-11 00:00:00.000000';
        (Returned 1 rows in 0.05s)
        7> exec FOO.insert '2015-11-11 00:00:00.0';
        (Returned 1 rows in 0.00s)
        8> exec FOO.insert '2015-11-11 00:00:00';
        Unparseable date: "2015-11-11 00:00:00"
        9> exec FOO.insert '2015-11-11';
        Unparseable date: "2015-11-11"
        1. workaround
      1. add at least 1 digit past seconds, HH:MM:SS.s as seen below
        7> exec FOO.insert '2015-11-11 00:00:00.0';

        Attachments

          Activity

            People

            • Assignee:
              bwhite Bill White
              Reporter:
              pzhao peter zhao
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: