When working with SQL you will inevitably be asked to return data from your database in a way it’s not stored. You’ll be asked to return city, state and zip as a single string, yet they are stored separately. You’ll be asked to return grand totals, but you only have line item totals. You’ll be…
Tag: SQL
SQL 101 – The Advanced LIKE Clauses
As I promised, this is my post on advanced LIKE clauses. Previously I’ve only shown you how to do a wildcard search that would act like the dos command “dir A*.*”, returning all the files that start with the letter A. But there is far more you can do with the LIKE operator. Wildcards themselves…
SQL 101 – SELECT, Filtering Results (Part 2)
In the previous post, I covered the WHERE clause. You should now feel pretty comfortable limiting the number of rows you get to return based on the values in a column. But I’m sure you’ve already asked “How can I limit based on two different columns?” I’m glad you asked! You can chain together your…
SQL 101 – SELECT, Filtering Results
After you learn how to get data out of a table with the SELECT command, you’ll soon ask the question, how do I limit the number of results I get back. Well, If you don’t ask the question, your DBA will. I don’t think he or she would like it if you only ever used…
SQL 101 – SELECT
The first thing you need to know when learning SQL is how to get data out of a database. This means learning the SELECT command. Using this command will get the SQL server to return data to you. You can use this command to do some simple math, or to do the common “Hello World!”…
SQL 101 – What is SQL?
SQL, pronounced S – Q – L or “sequel”, stands for structured query language. It’s the language you use to tell a database what you want to do. It’s been around since the early 1970s[1], so it’s pretty well established. One of the most awesome things about learning SQL is once you learn it, you…
SQL 101 – What is a Database
The term database is used for many different meanings. But if you compared them all, I think you would find that databases are all collections of data that are organized in some way. I usually like to refer to an Excel document when I try to explain databases. An excel file has a collection of…
Quickly Disconnect Users From a Database
Disconnect All Users of a Database There comes a time in every DBA’s life when he or she has many users connected to a database that needs to be detached, placed in single user mode, or simply refreshed. The problem is they keep reconnecting more quickly than you can KILL them off. This is especially…
Project 1
I’ve been back from Christmas for nearly a week now. I’ve accomplished much more than I thought I was going to be able to this week. I have been able to create my XML parser that will allow myself and others to develop forms more rapidly. Basically the way it will work is, you will…
My Milage Widget
After getting back from a long vacation weekend filled with plenty of driving, I started thinking. How many miles have I driven. Not just today, not just this week, but since I started driving. I started thinking back to my truck. I got it with 1.7 miles on the odometer. So I started thinking about…