Results for “expression”
Small, practical examples. Search by task or narrow things down below.
Replace every occurrence in a string
Substitute text directly with Bash parameter expansion.
replace✓ Tested
Replace literal text
Replace all literal matches in a Java string without regular expressions.
Java✓ Tested
Replace NULL in a result
Choose a fallback for a missing value.
COALESCE✓ Tested
Replace repeated whitespace
Normalize runs of whitespace to one space.
regex✓ Tested
Split text on a simple delimiter
PowerShell: The split operator uses a regular expression; this delimiter has no special regex meaning.
PowerShell✓ Tested
Substitute a value for NULL
Use SQL Server’s ISNULL expression.
ISNULL✓ Tested
Sum values per category
Calculate a grouped total.
SUM✓ Tested
Transform each item in a collection
Build a result array with a foreach expression.
foreach✓ Tested
Update several classifications in one statement
SQL: A CASE expression computes the new value for each row covered by the update predicate.
SQL✓ Tested
Update several classifications in one statement
SQL Server: A CASE expression computes the new value for each row covered by the update predicate.
SQL Server✓ Tested
Update several classifications in one statement
Postgres: A CASE expression computes the new value for each row covered by the update predicate.
Postgres✓ Tested
Update several classifications in one statement
SQLite: A CASE expression computes the new value for each row covered by the update predicate.
SQLite✓ Tested