FIND YOUR NEXT FEW LINES

The snippet library.

Small, practical examples. Search by task or narrow things down below.

10 snippets foundClear filters
SQLiteText cleanup & matching

Combine text values with a separator

SQLite: Use the concatenation operator supported by the selected SQL dialect.

SQLite✓ Tested
SQLiteText cleanup & matching

Match a known text prefix

SQLite: A percent wildcard matches zero or more characters following the prefix.

SQLite✓ Tested
SQLiteText cleanup & matching

Measure the length of ordinary text

SQLite: Use the engine’s text-length function; this ASCII example has no trailing spaces.

SQLite✓ Tested
SQLiteText cleanup & matching

Normalize ASCII text to lowercase

SQLite: LOWER is useful for display normalization; indexed case-insensitive search depends on the database collation and schema.

SQLite✓ Tested
SQLiteText cleanup & matching

Normalize ASCII text to uppercase

SQLite: UPPER changes character case under the database’s text rules.

SQLite✓ Tested
SQLiteText cleanup & matching

Place missing values after known values portably

SQLite: A CASE sort key controls NULL placement without relying on engine-specific defaults.

SQLite✓ Tested
SQLiteText cleanup & matching

Remove surrounding spaces from text

SQLite: TRIM removes leading and trailing space characters by default.

SQLite✓ Tested
SQLiteText cleanup & matching

Replace a literal substring

SQLite: REPLACE performs a literal replacement rather than a regular-expression substitution.

SQLite✓ Tested
SQLiteText cleanup & matching

Search for a literal LIKE wildcard

SQLite: Declare an escape character so a percent sign in the pattern is literal.

SQLite✓ Tested
SQLiteText cleanup & matching

Treat an empty trimmed value as missing

SQLite: NULLIF converts an empty string to NULL before a fallback is applied.

SQLite✓ Tested