# SQLite: no such function: X

**Code:** `no such function` · **Category:** SQL · **Seen on:** SQLite, Python

The query calls a function this SQLite build doesn't have.

## Meaning

Newer functions (`json_*` need JSON1, `unixepoch()` needs 3.38, `RIGHT`/`LEFT`, `CONCAT`, `NOW()` don't exist) may be missing in the bundled version. Use the SQLite equivalents (`||`, `substr`, `datetime('now')`) or register a custom function in the driver.

## Common causes

- MySQL/PostgreSQL function used in SQLite (NOW, CONCAT, LEFT)
- SQLite version too old for the function
- Extension (FTS5, JSON1) not compiled
- Custom function not registered
- Typo

## Quick fix

1. Use SQLite functions: `datetime('now')`, `||`, `substr`
2. Upgrade SQLite or check `sqlite_version()`
3. Register UDFs via `create_function`

## Detailed fix by platform

### SQL

1. `SELECT sqlite_version(); SELECT datetime('now'), 'a'
2. 'b', substr('hello', 1, 2);`

## How to diagnose

1. **Function** — SQLite native?
2. **Version** — New enough?
3. **Extension** — Loaded?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/sql/sqlite-no-such-function)
