Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Popular Content

How to get Database Design Horribly Wrong

Database Design is one of those tasks where you have to carefully get all the major aspects right. If you mess-up just one of these, it can all go horribly wrong. So what are these aspects that can ruin database design, and how can you get them right? Robert Sheldon explains.  Read more...
By Additional Articles 2015/03/19 | Source: SimpleTalk | Category: database design
Rating:  Rate this |   Briefcase | 13,745 reads

Using LAST_VALUE

When I began using LAST_VALUE, the results were not what I expected at all. Read on to learn the secret!  Read more...
By Kathi Kellenberger 2015/04/14 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 14,563 reads

Dynamically Query a 100 Million Row Table-Efficiently

This article describes methods of creating dynamic queries without the use of dynamic SQL to efficiently access large tables.  Read more...
By Gary Strange 2015/02/24 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 17,719 reads

Using APPLY to make your queries DRYer

Using the APPLY operator to reduce repetition and make queries DRYer.  Read more...
By Gerald Britton 2015/04/02 | Source: SQLServerCentral.com | Category: queries
Rating: |  Discuss |   Briefcase | 13,553 reads

Code Comparison for SQL Server vs. MariaDB

Daniel Calbimonte has written a code comparison for MariaDB vs. SQL Server as it pertains to how to comment, how to create functions and procedures with parameters, how to store query results in a text file, how to show the top n rows in a query, how to use loops, and more.  Read more...
By Additional Articles 2015/02/19 | Source: MSSQLTips.com | Category: mariadb
Rating:  Rate this |   Briefcase | 10,978 reads

The Internet of Things: A New World Order?

Was the marketing hook 'The Internet of Things' conjured up before the technical definition? Are we being persuaded to spend money on fending off yet another fantasy tsunami of data? Already, we have televisions that listen to, and report, your conversations; so are we facing the Science Fiction future of gadgets that report where you go, who you visit and what medications you take? As Robert Sheldon says; "It's big, almost too big to get your arms around".  Read more...
By Additional Articles 2015/04/10 | Source: SimpleTalk | Category: iot
Rating:  Rate this |   Briefcase | 9,459 reads

Painless Refactoring of SQL Server Database Objects

Refactoring a database object can often cause unexpected behavior in the code that accesses that object. In this article, adapted from his excellent book, Defensive Database Programming with SQL Server, Alex Kuznetsov discusses several techniques that will harden your code, so that it will not break, or behave unpredictably, as a result such changes.  Read more...
By Additional Articles 2015/04/08 | Source: SimpleTalk | Category: database objects
Rating:  Rate this |   Briefcase | 9,413 reads

Questions About T-SQL Control-of-Flow Language You Were Too Shy to Ask

Surely, we all know how T-SQL Control-of-flow language works? In fact it is surprisingly easy to get caught out. What, for example, do the BREAK, RETURN and CONTINUE keywords do in their various contexts? Robert Sheldon has the answers to this and other questions.  Read more...
By Additional Articles 2015/02/10 | Source: SimpleTalk | Category: t-sql
Rating:  Rate this |   Briefcase | 10,511 reads

Using SQL Server's GROUP BY clause to Summarize your Data

SQL Server’s GROUP BY clause provides you a way to aggregate your SQL Server data and to group data on a single column, multiple columns, or even expressions. Greg Larsen discusses how to use the GROUP by clause to summarize your data.  Read more...
By Additional Articles 2015/02/11 | Source: Database Journal | Category: group by
Rating:  Rate this |   Briefcase | 10,288 reads

Identifying and Solving Index Scan Problems

When you're developing database applications, it pays to check for index scans in the SQL Server query plan cache. Once you've identified the queries, what next? Dennes Torres gives some preliminary guidelines on how to find out why these index scans are being chosen for these queries and how to make the queries run faster and more efficiently.  Read more...
By Additional Articles 2015/03/30 | Source: SimpleTalk | Category: query plan
Rating:  Rate this |   Briefcase | 8,607 reads

Using the MERGE Statement to Perform an UPSERT

The term UPSERT has been coined to refer to an operation that inserts rows into a table if they don’t exist, otherwise they are updated. To perform the UPSERT operation Microsoft introduced the MERGE statement. Not only does the MERGE statement support the UPSERT concept, but it also supports deleting records. Greg Larsen discusses how to use the MERGE statement to UPDATE, INSERT and DELETE records from a target table.   Read more...
By Additional Articles 2014/12/22 | Source: Database Journal | Category: merge
Rating:  Rate this |   Briefcase | 11,863 reads

How DBAs Can Adopt the Craftsman Mindset

The job of a DBA requires a fusion of skill and knowledge. To acquire this requires a craftsman mindset. Craftsmen find that the better they get at the work, the more enjoyable the work gets, and the more successful they become. Deliberate practice, Specialization and an appetite for overcoming difficulty are good habits to deliberately adopt to successfully grow those craftsmanlike skills to the point that you become “so good they can’t ignore you”.  Read more...
By Additional Articles 2015/04/17 | Source: SimpleTalk | Category: dba skills
Rating:  Rate this |   Briefcase | 7,424 reads

Self-maintaining, Contiguous Effective Dates in Temporal Tables

'Temporal' tables contain facts that are valid for a period of time. When they are used for financial information they have to be very well constrained to prevent errors getting in and causing incorrect reporting. This makes them more difficult to maintain. Is it possible to have both the stringent constraints and simple CRUD operations? Well, yes. Dwain Camps patiently explains the whole process.  Read more...
By Additional Articles 2015/03/26 | Source: SimpleTalk | Category: temporary tables
Rating:  Rate this |   Briefcase | 8,271 reads

Introduction to SQL Server Spatial Data

More and more applications require the handling of geospatial data. It is easy to store spatial data, but it takes rather more thought to retrieve and manipulate it. Tasks like searching neighborhoods, and calculating distances between points is often required from databases. But how do you start? Roy and Surenda take you through the basics.  Read more...
By Additional Articles 2015/04/06 | Source: SimpleTalk | Category: spatial data
Rating:  Rate this |   Briefcase | 8,205 reads

Bowled Over by SQL Window Functions

What better way to learn how to construct complex CHECK CONSTRAINTs, use the SQL 2012 window frame capability of the OVER clause and LEAD analytic function, as well as how to pivot rows into columns using a crosstab query? Create the SQL code to score Ten-pin Bowling, of course. Dwain Camps explains the how, what and why.  Read more...
By Additional Articles 2015/02/12 | Source: SimpleTalk | Category: functions
Rating:  Rate this |   Briefcase | 9,116 reads

What is Behaviour Driven (Database) Development?

Behaviour Driven Development (BDD) is not always clearly understood, and the term is particularly unfamiliar in database circles. Seb Rose introduces us to the fundamentals of BDD, and make some suggestions for how it might be relevant to database development.  Read more...
By Additional Articles 2015/03/17 | Source: SimpleTalk | Category: agile database techniques
Rating:  Rate this |   Briefcase | 7,858 reads

Deploying the same database to many different RDBMSs

With the idea of a generic Dacpac defined by international standard, comes the potential for a Visual Studio developer to use SSDT to create a generic database model to a SQL-92 compliant standard that can then be deployed to any one of the major RDBMSs. The same database model would be deployable to Oracle, MySQL, or SQL Server, for example. Professor Hugh Bin-Haad explains the reasoning and technology behind this.  Read more...
By Additional Articles 2015/04/01 | Source: SimpleTalk | Category: humor
Rating:  Rate this |   Briefcase | 9,414 reads

Never Ignore a Sort Warning in SQL Server

It is always bad news if your SQL queries are having to use the SORT operator. It is worse news if you get a warning that sort operations are spilling onto TempDB. If you have a busy, slow TempDB, then the effect on performance can be awful. You should check your query plans to try to eliminate SORTs and never leave a SORT warning unheeded. Fabiano Amorim shows the range of ways of getting information on what is going on with a query that is doing a SORT and when requests are made for memory.  Read more...
By Additional Articles 2015/04/13 | Source: SimpleTalk | Category: sort
Rating:  Rate this |   Briefcase | 7,710 reads

IT Compliance and Software Development

What is IT Compliance and is it really necessary for contemporary Agile applications to be constrained by the requirements of compliance? William Brewer argues that if the objective is rapid delivery of applications, then compliance controls must be understood as early as possible in development.  Read more...
By Additional Articles 2015/03/11 | Source: SimpleTalk | Category: compliance
Rating:  Rate this |   Briefcase | 7,694 reads

Questions About T-SQL Transaction Isolation Levels You Were Too Shy to Ask

Every time you access a relational database to make a query, you have an important decision to make: What is the appropriate isolation level for your query? If you get this wrong, the consequences can be serious. Deadlocks, Dirty reads, Non-repeatable reads, or poor performance. We're in luck, because Robert Sheldon once more answers those questions that are awkward to ask in public.  Read more...
By Additional Articles 2014/12/18 | Source: SimpleTalk | Category: t-sql
Rating:  Rate this |   Briefcase | 10,726 reads