FIND YOUR NEXT FEW LINES

Results for “CMD”

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

254 snippets foundClear filters
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
PowerShellCollections & objects

Sum a collection

Calculate a total with Measure-Object.

Measure-Object✓ Tested
SQL ServerWindow analytics

Sum a row and its immediate predecessor

SQL Server: A ROWS frame counts physical ordered rows rather than all peers with the same sort value.

SQL Server✓ Tested
PowerShellArray operations

Test whether an array contains a value

PowerShell: The contains operator compares complete items rather than matching substrings.

PowerShell✓ Tested
PowerShellFunctions & control

Transform each item in a collection

Build a result array with a foreach expression.

foreach✓ Tested
PowerShellGetting Started

Transform each pipeline value

PowerShell: Transform each pipeline value using PowerShell 7.

PowerShell✓ Tested
SQL ServerText cleanup & matching

Treat an empty trimmed value as missing

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

SQL Server✓ Tested
PowerShellStrings & literal text

Trim whitespace around a string

PowerShell: The Trim method removes surrounding whitespace while preserving the middle of the string.

PowerShell✓ Tested
SQL ServerGetting Started

Turn a condition into a result label

SQL Server: Use CASE to describe stock availability for each row.

SQL Server✓ Tested
SQL ServerJSON & results

Turn JSON into typed rows

Project JSON array items into SQL columns.

OPENJSON✓ Tested
SQL ServerReporting & grouped calculations

Turn known group values into columns

SQL Server: Conditional aggregation gives a portable pivot when the category set is known.

SQL Server✓ Tested