【问题标题】:birt Problem with json_unquote with mysqlbirt mysql 的 json_unquote 问题
【发布时间】:2021-06-17 13:24:20
【问题描述】:

当我尝试使用 json_unquote 显示结果时,它在 birt 中显示 HEX 数字。

创建表的DB脚本:

创建表action_data1 ( id_ref bigint 非空, data_map 文字, 主键 (id_ref) ) ENGINE=InnoDB 默认字符集=utf8;

Rptdesign 已附加here

【问题讨论】:

  • 这与birt 无关。请显示(文字,无图片)您的表格定义,部分示例数据见minimal reproducible example
  • 我添加了 DB 脚本和 RptDesign 也附上了

标签: java mysql birt


【解决方案1】:
mysql> select json_unquote(json_extract('{"test":"abc"}','$.test')) as test;
+------+
| test |
+------+
| abc  |
+------+

它似乎工作正常,所以需要更多输入。

编辑:

看到Brit return Mysql string concatenated field as a blob

你可以试试这个:

select convert(json_unquote(json_extract(data_map,'$')),CHAR); 

【讨论】:

  • 是的,在 Mysql 中显示正确,但在 birt 中显示 HEX 代码
猜你喜欢
  • 2011-02-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-02-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多