FIND YOUR NEXT FEW LINES

Results for “expression”

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

73 snippets foundClear filters
Bash ScriptsVariables & text

Replace every occurrence in a string

Substitute text directly with Bash parameter expansion.

replace✓ Tested
JavaStrings

Replace literal text

Replace all literal matches in a Java string without regular expressions.

Java✓ Tested
SQLExpressions & aggregates

Replace NULL in a result

Choose a fallback for a missing value.

COALESCE✓ Tested
PowerShellText & data

Replace repeated whitespace

Normalize runs of whitespace to one space.

regex✓ Tested
PowerShellStrings & literal text

Split text on a simple delimiter

PowerShell: The split operator uses a regular expression; this delimiter has no special regex meaning.

PowerShell✓ Tested
SQL ServerSelect & page

Substitute a value for NULL

Use SQL Server’s ISNULL expression.

ISNULL✓ Tested
SQLExpressions & aggregates

Sum values per category

Calculate a grouped total.

SUM✓ Tested
PowerShellFunctions & control

Transform each item in a collection

Build a result array with a foreach expression.

foreach✓ Tested
SQLBulk changes & set operations

Update several classifications in one statement

SQL: A CASE expression computes the new value for each row covered by the update predicate.

SQL✓ Tested
SQL ServerBulk changes & set operations

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
PostgresBulk changes & set operations

Update several classifications in one statement

Postgres: A CASE expression computes the new value for each row covered by the update predicate.

Postgres✓ Tested
SQLiteBulk changes & set operations

Update several classifications in one statement

SQLite: A CASE expression computes the new value for each row covered by the update predicate.

SQLite✓ Tested