FIND YOUR NEXT FEW LINES

Results for “tab”

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

684 snippets foundClear filters
SQLJoins & subqueries

Find rows with a related record

Use EXISTS without duplicating the outer rows.

EXISTS✓ Tested
GitCommits & history

Find the commit responsible for a line

Inspect line attribution in a stable machine-readable format.

blame✓ Tested
SQL ServerDates & text

Find the final day of a month

Use EOMONTH without manually calculating month length.

EOMONTH✓ Tested
PowerShellArray operations

Find the index of an array item

PowerShell: Array.IndexOf returns -1 when the requested item is absent.

PowerShell✓ Tested
PowerShellDates & numeric validation

Find the number of days in a month

PowerShell: DaysInMonth handles leap-year February correctly.

PowerShell✓ Tested
SQLSubqueries & ranked selection

Find the second-highest distinct value

SQL: Select the maximum below the overall maximum to skip ties at the top.

SQL✓ Tested
SQL ServerSubqueries & ranked selection

Find the second-highest distinct value

SQL Server: Select the maximum below the overall maximum to skip ties at the top.

SQL Server✓ Tested
PostgresSubqueries & ranked selection

Find the second-highest distinct value

Postgres: Select the maximum below the overall maximum to skip ties at the top.

Postgres✓ Tested
SQLiteSubqueries & ranked selection

Find the second-highest distinct value

SQLite: Select the maximum below the overall maximum to skip ties at the top.

SQLite✓ Tested
PowerShellDates & numeric validation

Format a bounded duration as hours minutes and seconds

PowerShell: TimeSpan can format duration components with escaped separators.

PowerShell✓ Tested
PowerShellText & data

Format a date without locale ambiguity

Parse an ISO date and format it consistently.

date✓ Tested
SQL ServerTransactions & tables

Generate a bounded sequence recursively

Use a recursive CTE with a recursion limit.

recursive CTE✓ Tested