【问题标题】:Use SOUNDEX function in Websql在 Websql 中使用 SOUNDEX 函数
【发布时间】:2015-09-02 15:38:27
【问题描述】:

我正在尝试将此函数包含在 websql 查询中,例如

"select * from products where filter like '%pname%' order by soundex(filter);"

但据此:https://www.sqlite.org/lang_corefunc.html

只有在使用 SQLITE_SOUNDEX 参数编译 sqlite 时,Soundex 函数才可用,我不认为 chrome 是这样的情况

could not prepare statement (1 no such function: soundex)

所以,我的问题是,有没有办法使用 soundex 函数,或者至少是其他一些类似的函数?

编辑 1: 现在我只是在使用

order by coalesce(like('pname', filter), 0)

这不是最终的解决方案,但比按特定列的简单排序要好。

【问题讨论】:

    标签: sqlite google-chrome chromium web-sql


    【解决方案1】:

    WebSQL 没有指定哪些 SQL 函数可用,也没有安装用户定义函数的机制。

    【讨论】:

    • 那么,你是说没有办法获取或模仿soundex函数?
    猜你喜欢
    • 2021-10-31
    • 2011-11-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-14
    • 2014-08-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多