Sometimes, you’ll find all sorts of craziness when you’re working with data. Especially if you don’t expect there to be any craziness. Let me show you what I mean by a story of what I had happen just this week. In mapping some data from one database to another, I was asked to do the…… Continue reading Odd things found when working with data
Tag: T-SQL
Transactions should (never) be distributed
For the last few blog posts, we’ve been talking about transactions. If you’ve missed any, be sure to click on the links below: Using Save Points with Transactions to Get BetterHow about we TRY and CATCH some Transactions?Setting up a Friendly TRANSACTION In the version of transactions that we going to discuss today, we’re going…… Continue reading Transactions should (never) be distributed
Using Save Points with Transactions to Get Better
When we last conversed, we talked about the TRY/CATCH block and how it works with transactions. If you somehow missed that, you can read about it here – How about we TRY and CATCH some Transactions? We’ll wait for you… All right, now that everyone’s back with us, we’ll talk more about everyone’s favorite -…… Continue reading Using Save Points with Transactions to Get Better
How about we TRY and CATCH some Transactions?
In our last post, we started talking about transactions and how they can help your databases have data integrity. Let’s continue that today with our friends TRY and CATCH. TRY is just telling SQL Server that we want to try out something. CATCH tells SQL Server what to do if it completely messes up. BEGIN…… Continue reading How about we TRY and CATCH some Transactions?
Setting up a Friendly TRANSACTION
The last time we were together, I discussed DCL and TCL. That post ended with a quick paragraph on transactions and how they can help with data integrity. Today, I want to go more in-depth on this very important topic. Transactions always – and I do mean always – start with the phrase BEGIN TRAN.…… Continue reading Setting up a Friendly TRANSACTION
Accessing and Transacting Languages in SQL Server
Over the last few posts, we’ve discussed DDL and DML. This week I want to actually discuss the other 2 types of languages with SQL Server – DCL and TCL. DCL is the Data Control language. These are the commands that give security permission to a person – or group – to get things done.…… Continue reading Accessing and Transacting Languages in SQL Server
How to Define objects
In my last post, I discussed some of the DML commands in SQL Server. This week I want to discuss another category of commands – Data Definition Language, or DDL. DDL is used to define or redefine the structure of the database. The commands that are used for DDL are as follows: CREATEDROP ALTERRENAMETRUNCATE So…… Continue reading How to Define objects
Unique Categories of Commands within SQL
For a while now, I’ve been talking about specific functions used within SQL Server. For example, I’ve talked about DATALENGTH, REPLICATE, and STUFF, along with many others. And all that is great and should be known if you work with SQL Server on a regular basis. But today, I want to talk about the different…… Continue reading Unique Categories of Commands within SQL
Grouping Items in Such A Way
Last time, we were able to go over a way to group data that is probably not familiar to many. This time, I want to go over an extra piece to that puzzle that should add even more functionality to your repertoire when it comes to data functionality. First, we have the basic query that…… Continue reading Grouping Items in Such A Way
Getting Data to Group Better
A lot of the time you’re going to be asked to group items. Sometimes, you have to look at the exact same data in multiple ways. It can be just flat ugly to look at but it does what you need to. Well, today we can talk about a way to make it a bit…… Continue reading Getting Data to Group Better