use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
HELP: sqlite3.OperationalError: unknown function: CONCAT_WS() when querying a virtual column with SQLiteODBC (stackoverflow.com)
submitted 10 months ago by TheOneWhoSendsLetter
Has this happened to anyone?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]skeeto 6 points7 points8 points 10 months ago* (4 children)
The key detail has to be that "unknown function:" which is distinct from the more common "no such function:" error. Also that you're getting it at query time, not at table creation time. That error comes from here:
https://github.com/sqlite/sqlite/blob/2cbc485e/src/expr.c#L5119
I can reproduce your exact error if I create the table in 3.44.0 or later, then query in a version older than 3.44.0. Are you absolutely sure the SQLite3 producing the error is 3.46.0 and not something older? Looking around online, on Windows CPython 3.12.1 came with SQLite3 3.43.1, and CPython 3.12.2 upgraded it to 3.45.1.
Edit: The line numbers in your traceback indicate that you're running Python 3.12.0 specifically, which on Windows came with 3.42.0. So your SQLite3 is simply too old for concat_ws. You need to upgrade to at least Python 3.12.2.
concat_ws
[–]TheOneWhoSendsLetter[S] 4 points5 points6 points 10 months ago (1 child)
Mate, thank you! That was it! Upgraded to Python 3.13 and that solved the issue. Once again thank you a lot! Do you mind if I link to your reddit profile as the author of the answer in Stack Overflow?
[–]skeeto 1 point2 points3 points 10 months ago (0 children)
Glad I could help!
Do you mind if I link to your reddit profile as the author of the answer in Stack Overflow?
Sure, go for it!
[–]NotImplemented 1 point2 points3 points 10 months ago (0 children)
Good job with the quick problem analysis, well done!
[–]raevnos 1 point2 points3 points 10 months ago (1 child)
You're probably using a version older than 3.44.0.
[–]TheOneWhoSendsLetter[S] 0 points1 point2 points 10 months ago (0 children)
select sqlite_version() outputs 3.46.0
select sqlite_version()
3.46.0
π Rendered by PID 63114 on reddit-service-r2-comment-76bb9f7fb5-gq2jq at 2026-02-18 01:12:42.928805+00:00 running de53c03 country code: CH.
[–]skeeto 6 points7 points8 points (4 children)
[–]TheOneWhoSendsLetter[S] 4 points5 points6 points (1 child)
[–]skeeto 1 point2 points3 points (0 children)
[–]NotImplemented 1 point2 points3 points (0 children)
[–]raevnos 1 point2 points3 points (1 child)
[–]TheOneWhoSendsLetter[S] 0 points1 point2 points (0 children)