I want to talk about some best practices concerning naming conventions. Most teams or organizations will come up with their own naming conventions for things. This post is not here to tell anyone how to define their naming conventions, especially for things outside of SQL Server. I want to talk specifically about things inside the…
Category: Development
Necessity is the Mother of Automation
If you have worked with me or are a frequent reader of my blogs or a frequent attendee of my presentations, you know I hate doing things manually. Over my career, I have found that one of the biggest enemies of automation is being able to get someone else to do it manually. If you…
Coding Naked
I know the title sounds like clickbait, but it’s how I’ve felt for a long time. Why? Because of CASE tools. CASE stands for Computer-Aided Software Engineering. Here, I’m referring to data modeling tools like ErWin and ER/Studio. It disheartens me that the industry as a whole has gotten away
BCP and Code Page Fun
Quick, what’s the fastest and easiest way to get data out of a SQL Server table? Time’s up. It’s BCP. If you aren’t familiar with BCP it is a command line utility to bulk copy data out of, and in to tables. It has been around for donkeys years (technical term), and while it doesn’t…
ISNULL & Data Length Handling
[unable to retrieve full-text content]Some folks are not fans of having NULL values in your data. I am not much of a fan myself, however sometimes (all the time) they are a reality in which we have to deal. When working with NULL there are lots of strange behaviors you have to be sure to…
Grody to the VARCHAR(MAX)
This morning I was looking through a new vendor database to see exactly what I would be supporting and I stumbled upon a curious table. This table seemed quite normal to the naked eye until I glanced upon the data types. There were four, count them four fields set to VARCHAR(MAX) and two set to…
Best practice recommendations for writing Dynamic SQL
Note this is not “Best Practices when USING Dynamic SQL”. These are just good habits I’ve come up with over the years to make sure that when writing my dynamic SQL it breaks less often. Note I don’t say “doesn’t break ever”, dynamic SQL is tricky stuff. The best you are likely to get is…
Developing To Specifications
I’m a DBA. As a class of people you will find that DBAs have a tendency to rant a little about developers. I would certainly be someone that you would find in that category. The trouble is that most of the time I don’t think that it is the developers fault, it is just a…
T-SQL Tuesday #18–CTE A Simpler Form Of Recursion
It’s T-SQL Tuesday time folks. Bob Pusateri (blog|twitter) is the host and has chosen Common Table Expressions (CTEs) as the topic of the month. Several ideas came to mind for writing about CTEs, one of the best uses I’ve seen for one recently was to grab the name of the most recent backup file for…
Are You Putting Out?–The SQL OUTPUT Clause
I had some code come through the other day from a developer, it was designed to perform an insert and then return the inserted data back to the client for display. This kind of code is probably seen very frequently out there in the real world. Quick, Create A Table As we’ll be playing around…