Tag Archives: sql server

T-SQL–Converting Seconds to Time

I was working on a small piece of code the other day that was calculating the seconds for an event. I had a function that returned me the seconds as an integer. That’s good, but I wanted to get that … Continue reading

Posted in Blog | Tagged , , | 2 Comments

Attaching All Databases with PowerShell–Refactoring out Write-Host

Someone posted a note to me on Twitter that noted that Write-Host is not recommended for your scripts. I checked the link to an MSDN blog on Write-Host Considered Harmful, and it made some sense. Basically it says that since … Continue reading

Posted in Blog | Tagged , , , , | Comments Off on Attaching All Databases with PowerShell–Refactoring out Write-Host

Attaching All Databases with PowerShell–Attaching Missing Databases

I wrote a PowerShell script recently to actually accomplish a task I that I needed. What’s more, this was the first time I thought that Powershell might prove more useful than other methods. This series looks at my script, and … Continue reading

Posted in Blog | Tagged , , , | Comments Off on Attaching All Databases with PowerShell–Attaching Missing Databases

Quick Tips–SSMS Select a vertical block

I saw this years ago in a presentation from Aaron Bertrand. At the time I thought it was super cool and I’d use it all the time, but I haven’t found many uses. However since I needed to do this … Continue reading

Posted in Blog | Tagged , , , | Comments Off on Quick Tips–SSMS Select a vertical block