Database Fundamentals #15: Modifying Data With T-SQL

Database Fundamentals, SQL Server, SQL Server 2016, SQL Server 2017
The preferred method for modifying your data within a database is T-SQL. While the last Fundamentals post showed how to use the GUI to get that done, it's not a very efficient mechanism. T-SQL is efficient. UPDATE The command for updating information in your tables is UPDATE. This command doesn’t work the same way as the INSERT statement. Instead of listing all the columns that are required, meaning columns that don’t allow for NULL values, you can pick and choose the individual columns that you want to update. The operation over-writes the information that was stored in the column with new information. In addition to defining the table and columns you want to update, you have to tell SQL Server which rows you’re interested in updating. This introduces the WHERE…
Read More

I May Never Be a Data Scientist

Data Science
Chances are extremely high that I'll never put down Data Scientist as my job. Considering what you do and what you know, I'll bet a healthy percentage of you are in a similar situation. That's OK. You know why? You know a lot about data, data movement and data processing that a Data Scientist doesn't. They Also Serve I don't know about you, but I'm not standing around waiting to serve. Instead, I'd be actively chasing after any and all Data Scientists within my organization offering to serve. If you can't be the Data Scientist who do you want to be? The Data Scientist's go-to technician. That's me handing over a new data set to the Data Scientist I'm working with: OK, really it's the best James Bond and the…
Read More

Get That Profiler Feel in Extended Events

SQL Server, SQL Server 2016, SQL Server 2017
I know. You love Profiler. I hear you. You're wrong, but that's OK. Kidding... mostly. Unfortunately though, I think a lot of what passes for issues and problems with Extended Events is actually a lack of knowledge about how they work. Let's take an example and run with it. No Grid in Extended Events One of the pushbacks I hear about using Extended Events is that the Live Data GUI just doesn't have that neat Profiler grid output. Instead you see a list of events in the top pane and then you have to look at the details in the bottom pane. It looks like this out of the gate: You're right. That's a royal pain. That's it. Toss Extended Events. Back to Profiler. Well, hang on a second. Let's…
Read More

Presenting Azure Vs. Working With Azure

Azure
I have a real infatuation with Azure. I'm especially interested in the Platform as a Service (PaaS) offerings in and around the Data Platform. I truly believe that these are the subversive elements that are going to change how a lot of us get our jobs done with data. I've worked with Azure SQL Database within my organization and I do lots of experimentation and testing. Any chance I get, I like to present sessions on Azure. Funny thing though, my presentations are never as easy as work, and I think I ought to discuss why. Connectivity, Connectivity, Connectivity In case you can't tell, I'm starting off talking about connectivity. However, this is an important topic. When I'm working on Azure, I'm usually hooked up to my home office or…
Read More

The GDPR and You

Professional Development
Ever heard of the General Data Protection Regulation? If not, go and read the Wiki. I'll wait. I can already hear what you're thinking. "Grant, this doesn't apply to me because my company is in the <insert non-EU country here>." How do I know you're thinking that? Because every single person with whom I've brought this up has had the same response. You might want to go back and re-read it. Data Subject There are three terms from the GDPR that you need to know. The first is Data Controller. This is any organization or individual that collects data from the Data Subject. If the Data Controller is located in the EU, then you're subject to the new regulations. Yes, I know, this means you don't have to worry. Hang…
Read More

Extended Events and Profiler: XE Profiler

SQL Server 2017
There's a war on in the SQL Server world. On the one side is Profiler (although, really, everyone uses Trace Events). On the other, the "new" (they came out in 2008 with a full GUI in 2012, so...) Extended Events. Lots of people have picked sides on this, including Microsoft. New Trace Events There are none. All the new functionality of every sort from Availability Groups to Query Store to R & Python, have Extended Events created for them. Trace Events, and the technologies supporting them in the form of Profiler, are a dead end. Don't fear. While Trace is on the deprecation list, there doesn't appear to be any fear of that technology being removed completely. At least it won't be removed in the foreseeable future. A future which,…
Read More

Inside My PASS Summit

PASS
As you read this, I'm in Seattle for the PASS Summit 2017. I have four roles that I satisfy at Summit; Vendor through my glorious employer Redgate Software, Board Member of the PASS organization, Speaker, and Attendee. Let me tell you about my Summit that's coming up. What is PASS? But first, a word from... well, they're not a sponsor of this blog in any way, but PASS and the community that creates and runs it made my career what it is today. PASS is the single largest organization in the world today supporting training, networking and knowledge sharing in and around the Microsoft Data Platform. The organization runs Local Groups around the world that offer free training all year round. PASS supports SQLSaturday events globally. There are also Virtual…
Read More

PASS Summit and Redgate Software

Redgate Software
Next week is the PASS Summit. I'm so excited about it I could pop. Part of why I'm excited is because Redgate always does so much fun stuff at Summit. I'm presenting sessions, Steve Jones and our latest (and probably greatest) new team member, Kathi Kellenberger are also presenting sessions. This year is we're also going to be throwing a great party. Stop by the booth, talk to a Redgater (me included) and we'll get you a ribbon for the #redgaterocks party. It's taking place on Thursday, November 2nd at 1927 Events, 1927 3rd Ave. We'll have a bunch of our people at the booth ready and willing to show of all the cool new software we've been working on. If you're at PASS Summit, please track me down in the…
Read More

Database Fundamentals #14: Modifying Data Through SSMS

Database Fundamentals
I've said it before, but I feel I should repeat myself. Using the SSMS GUI for data entry and data manipulation is not the preferred mechanism. T-SQL is the right way to manipulate the data in your database. For purposes of completion though, I will show the GUI methods in this blog series. Information doesn’t go into the database and stay there, unchanged, forever. Data is modified. This occurs because information changes, such as when a person marries and changes their name, or information was incorrectly entered, in which case you need to fix it, or just about anything else. You have to have a mechanism for modifying existing information. Modifying Data You start modifying data in the tables the same way you did the insert, by taking advantage of…
Read More