Archive

Posts Tagged ‘enterprise-it’

Functions – A handy tool for formatting data (among other things)

October 9, 2012 Leave a comment

Last week we started Spatial with Part 1 of a series, and we’ll get back to that on Thursday.  Today, we’ll talk about functions.  Functions are a tool that can be used by developers to perform automated data replacement, concatenation, calculations or other tasks in a much easier way:  by programming a function, then simply calling that function for the field that needs to be calculated.   There are two types, system functions and User-Defined Functions (UDF’s).  This post is going to deal with UDF’s. Read more…

Spatial, Geography, and Geometry. Oh my! – Geospatial Data Part 1

October 2, 2012 1 comment

Geography and Geometry.  Gives me flashbacks to high school.  Though those would lead to interesting stories, today we’re here to discuss Spatial within SQL Server.   There are a lot of different uses for spatial, but it all boils down to the ability to represent SQL Server data on a map, either 3D or 2D.  Shall we begin? Read more…

Common Table Expressions (CTE) – What they are and how to use them

September 13, 2012 3 comments

Common Table Expressions are a nice tool in SQL Server that allow you to create Temporary Tables without using TempDB.  They only exist while the query runs, whereas temp tables live for the entire session.  They are a great tool when it comes to optimizing queries, as it also reduces the load on tables at runtime.  Today, we’ll discuss what they are and how they’re used. Read more…

Basic Querying in SQL Server

September 11, 2012 Leave a comment

Today we’re going to talk about querying a database in SQL Server.  Queries can be really simple or nearly infinitely complex.  But that complexity can be deceiving, as it all breaks down to multiple combinations of the simple aspects of querying.  Today, we’ll discuss selecting items from a database and limiting those results to get results the way we want them.  You should have SQL Server 2008R2 and the AdventureWorks2008R2 database installed on your system.  If you don’t already, see the “Software”  link above. Read more…