FIND YOUR NEXT FEW LINES

Results for “CMD”

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

254 snippets foundClear filters
SQL ServerGetting Started

Select values in an inclusive range

SQL Server: BETWEEN includes both endpoints of the range.

SQL Server✓ Tested
PowerShellText & data

Serialize a hashtable as JSON

Produce compact JSON for a small data object.

JSON✓ Tested
PowerShellStructured formats & encodings

Serialize nested objects with an explicit depth

PowerShell: Select a sufficient depth so nested data is retained instead of converted into a descriptive string.

PowerShell✓ Tested
SQL ServerJSON & results

Serialize query rows as JSON

Return a JSON array directly from a SELECT.

FOR JSON✓ Tested
SQL ServerWindow analytics

Show a group total beside each detail row

SQL Server: A partitioned aggregate preserves detail rows instead of collapsing them with GROUP BY.

SQL Server✓ Tested
PowerShellGetting Started

Sort a sequence of numbers

PowerShell: Sort a sequence of numbers using PowerShell 7.

PowerShell✓ Tested
PowerShellCollections & objects

Sort and deduplicate values

Produce an ordered list without duplicates.

Sort-Object✓ Tested
SQL ServerSubqueries & ranked selection

Sort preferred rows ahead of other rows

SQL Server: A CASE ordering key expresses business priority before a stable secondary sort.

SQL Server✓ Tested
SQL ServerGetting Started

Sort the highest quantities first

SQL Server: Specify descending order and a stable tie breaker.

SQL Server✓ Tested
PowerShellArray operations

Split an array into fixed-size batches

PowerShell: Bound the final index so the last batch can contain fewer elements.

PowerShell✓ Tested
SQL ServerDates & text

Split delimited text with positions

Retain original order with STRING_SPLIT ordinals.

STRING_SPLIT✓ Tested
PowerShellGetting Started

Split simple delimited text

PowerShell: Split simple delimited text using PowerShell 7.

PowerShell✓ Tested