-
思源笔记 SQL 命令求助
2024-02-08 17:53出现两个 SQL 的请求,第一个 SQL 请求返回数据如下:
{"code":1,"msg":"no such column: k1mtxu6","data":null}
这里面的 k1mtxu6 是文档 ID
第二个 SQL 请求返回如下:
{ "code": 0, "msg": "", "data": [ { "alias": "", "box": "20240207183515-9gqfl7s", "content": "SELECT\n content __1__姓名, \n( SELECT replace(content, \"单位:\", \"\") FROM blocks where root_id = 20240207184018-k1mtxu6 and content like '单位:%' limit 1 ) __2__单位, \n( SELECT replace(content, \"职位:\", \"\") FROM blocks where root_id = 20240207184018-k1mtxu6 and content like '职位:%' limit 1 ) __3__职位\nFROM\n blocks p\nWHERE\n hpath like '/姓名/%'\n and type = 'd'\n", "created": "20240208172935", "fcontent": "", "hash": "fb2b10f", "hpath": "/姓名", "ial": "{: custom-type=\"query-code\" id=\"20240208172935-78ki7ec\" style=\"line-height: 22px;\" updated=\"20240208172945\"}", "id": "20240208172935-78ki7ec", "length": 355, "markdown": "```sql\nSELECT\n content __1__姓名, \n( SELECT replace(content, \"单位:\", \"\") FROM blocks where root_id = 20240207184018-k1mtxu6 and content like '单位:%' limit 1 ) __2__单位, \n( SELECT replace(content, \"职位:\", \"\") FROM blocks where root_id = 20240207184018-k1mtxu6 and content like '职位:%' limit 1 ) __3__职位\nFROM\n blocks p\nWHERE\n hpath like '/姓名/%'\n and type = 'd'\n```", "memo": "", "name": "", "parent_id": "20240207184018-k1mtxu6", "path": "/20240207184018-k1mtxu6.sy", "root_id": "20240207184018-k1mtxu6", "sort": 10, "subtype": "", "tag": "", "type": "c", "updated": "20240208172945" } ] }
-
思源笔记 SQL 命令求助
2024-02-08 17:32这个 SQL 语句可以实现我想要的功能,但是为什么使用这个挂件,第一次可以查询成功
再点 Query 的那个按钮,会显示红色按钮报错,查看插件的说明文档,提示红色是因为
- SQL 语句错误
- 未知错误