Results for “up”
Small, practical examples. Search by task or narrow things down below.
Return zero for a sum over no rows
SQL Server: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.
SQL Server✓ Tested
Return zero for a sum over no rows
Postgres: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.
Postgres✓ Tested
Return zero for a sum over no rows
SQLite: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.
SQLite✓ Tested
Search for a literal LIKE wildcard
SQL: Declare an escape character so a percent sign in the pattern is literal.
SQL✓ Tested
Search for a literal LIKE wildcard
SQL Server: Declare an escape character so a percent sign in the pattern is literal.
SQL Server✓ Tested
Search for a literal LIKE wildcard
Postgres: Declare an escape character so a percent sign in the pattern is literal.
Postgres✓ Tested
Search for a literal LIKE wildcard
SQLite: Declare an escape character so a percent sign in the pattern is literal.
SQLite✓ Tested
Set a JSON property
Create an updated JSON document from existing text.
json_set✓ Tested
Sort and remove repeated values
Sort and remove repeated values in a complete Rust program using the standard library.
Rust✓ Tested
Sum values per category
Calculate a grouped total.
SUM✓ Tested
Toggle an output using an explicit software state
Arduino / C: Keep the intended output state in a Boolean variable.
Arduino / C✓ Tested
Treat an empty trimmed value as missing
SQL: NULLIF converts an empty string to NULL before a fallback is applied.
SQL✓ Tested