Library Tips
SQL Server Tips
Short, practical tips and tricks for working with SQL Server — the kind of thing worth knowing before you need it.
- Beware of an Odd Problem with CAST() and CONVERT()SQL Server quirk: CAST/CONVERT of a negative integer exactly as long as the target varchar returns neither an overflow error nor the number, unlike positive, shorter, or longer values.Released
- Searching DMFs and DMVsQuery sys.all_columns filtered to negative object_ids to search DMV and DMF column names by keyword (e.g., %lsn%), a quick way to explore SQL Server internals metadata.Released
- A Simple Tip for Acceptance TestingGetting busy SMEs to finish acceptance testing: keep test environments ready and requests bite-sized, then book short 30-40 minute collaborative testing sessions on their calendars.Released
- A Simple Tip for Calculating PercentagesT-SQL tip: compute percentages from integers with partial * 100.0 / total, which avoids extra CAST/CONVERT calls and often gives better precision than (partial / total) * 100.Released
Consulting
Initial consultations are always free.
Bring your toughest SQL Server problem — performance, backups and restore-testing, auditing, encryption — and get an independent, experienced second set of eyes.