-
嵌入块中,SQL 支持 TIMESTAMPDIFF 和 CONCAT 函数吗?
2023-09-14 17:34知道了,让 chatgpt 帮着写 SQLlite 能实现相同功能代码。已解决。谢谢!
-
嵌入块中,SQL 支持 TIMESTAMPDIFF 和 CONCAT 函数吗?
2023-09-14 17:19已解决,原来思源笔记用的 SQLlite 数据库。通过询问 Chat-GPT,用‘||’代替 CONCAT,用 strftime 代替 timestampdiff。
select * from blocks where root_id='20230828090902-ikpfy0q' AND subtype='h2' AND content LIKE '%' || (SELECT (strftime('%Y', 'now') - strftime('%Y', '2023-08-03')) * 12 + (strftime('%m', 'now') - strftime('%m', '2023-08-03')) AS months_diff) || '月' || '%';