Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-2772

retrieve a value from Json string got an error: Json value is invalid

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      >>create table json(str varchar(200));
      >>select json_object_field_text('

      {"f2":1}

      ', 'f2') from json;

          • ERROR[8971] JSON value is invalid.

      — 0 row(s) selected.
      >>

      the expected result should like below.
      >>select json_object_field_text('

      {"f2":1}

      ', 'f2') from (values(1)) T;

      (EXPR)
      --------

      1

      — 1 row(s) selected.
      >>
      >>select json_object_field_text('

      {"f2":1}

      ', 'f2') from (values(1)) T;

      (EXPR)
      --------

      1

      — 1 row(s) selected.
      >>

      Attachments

        Activity

          People

            andyyangcn Yang, Yongfeng
            andyyangcn Yang, Yongfeng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: