DBCC DBReindex

I ran into some 'Message 823' issues on my development DB, and upon running DBCC CheckDB() I saw that my indexes were the ones throwing the errors.

Continue Reading

sp_msforeachtable

I will make this short and sweet for you. If there is something you want to do to all tables in your database, there is a command for you. I wil

Continue Reading

The thing with cursors

So our aggregated databases have experienced some loading errors lately, and until that gets fixed, I have to collect the data straight from the field

Continue Reading

Cast datetime as varchar

I stumbled upon this great Q+A on Stack Overflow when I was looking for options to cast datetime for a report. (The customer didn't like our standard

Continue Reading