Earlier this year, I published the first crack at a Data Blogger Resource Kit. When I initially created the kit, I wasn’t quite sure exactly what direction I would go with it. In the months since, I’ve started to get a better idea of where I want to go, and …
Yesterday, I talked about batching deletes, and the day before I talked about how much I like to delete data, and why it's necessary to do it, despite being a data pack rat. Today, let's look at just one scenario, and how I like to handle it. In my experience, …
Updated (2018-09-24): SQL Ops Studio is now generally available, and has been renamed Azure Data Studio. I've updated the cheat sheet to reflect the name change, but the shortcuts remain the same. Feel free to grab the updated PDF with the new label, or keep …
Question I'm creating a query that has a column of dates stored as a VARCHAR in the format DD-MMM-YYYY.
Could you tell me how I can convert this into date format please?
I don't want to alter the original table in any way, as it's not mine to tinker!
Question I am a new DBA at a company that has never had a DBA before me. SQL Servers are never upgraded unless it is part of a Windows Update on the server. Service Packs (or CUs) are never installed. We have a mix of versions from 2000 to 2014.
Question I have 4 tables with dates to which I want to join to a date dimension table but it is returning many duplicates with left joins.
Tables are basically a date field which I want to count.
mdate datetime, mordate varchar(10),fteam varchar(20) sdate …
Question I am trying to pull all data where a sale date is >= to a certain datetime. When I execute my query I get an error of:
Msg 241, Level 16, State 1, Line 15
Conversion failed when converting date and/or time from character string.
In SQL Server, auto-update statistics is a database level setting. It’s right there:
I’m not going to say whether I think Auto Update Statistics should be on or off. Instead, I’m going to argue that there are definitely scenarios when you want to have this on …