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

Guest Columnist: Dwain Camps

SQLServerCentral.com profile

   Items 1 to 20 of 23    Older >>
 

The Case for Scalar-valued, User-defined Functions in T-SQL

Did you know that scalar-valued, user-defined functions can be used in DEFAULT/CHECK CONSTRAINTs and computed columns? Learn about it...  Read more...
By Dwain Camps 2015/05/12 | Source: SQLServerCentral.com | Category: scalar udf
Rating: |  Discuss |   Briefcase | 5,835 reads

Identifying Start Dates not Aligned with End Dates on a Prior Row

When effective end dates don't align properly with effective start dates for subsequent rows, what are you to do?  Read more...
By Dwain Camps 2015/03/24 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 5,923 reads

The Right and Wrong of T-SQL DML TRIGGERs (SQL Spackle)

Triggers in T-SQL have many uses. There are right and wrong ways to write triggers. To learn the difference, read on...  Read more...
By Dwain Camps 2015/03/17 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 6,429 reads

Adding a Query Governor to Dynamic-Search Stored Procedures

When undisciplined users access your search forms, you can control their behavior and limit the results they're presented with in various ways.  Read more...
By Dwain Camps 2014/12/15 | Source: SQLServerCentral.com | Category: dynamic search
Rating: |  Discuss |   Briefcase | 3,957 reads

Improving Performance for Some LIKE “%string%” Searches (SQL Spackle)

If you've ever wondered if you can do better than an INDEX SCAN when you do a LIKE "%string%" search, read on...  Read more...
By Dwain Camps 2015/01/16 (first published: 2014/04/07) | Source: SQLServerCentral.com | Category: sql like search
Rating: |  Discuss |   Briefcase | 30,714 reads

Creating a Date Range from Multiple Rows Based on a Single Date

When you've got only a single effective date on a record and you need to artificially create the effective end date based on a following row in T-SQL, the techniques discussed in this article will help you decide what is best.  Read more...
By Dwain Camps 2014/03/18 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 7,693 reads

The SQL TABLE Type: Beyond Table-Valued Parameters

Follow along as this starter article on the SQL TABLE Type walks you through the various ways it can be used in T-SQL.  Read more...
By Dwain Camps 2014/03/03 | Source: SQLServerCentral.com | Category: sql table type
Rating: |  Discuss |   Briefcase | 6,828 reads

Logging and Error Handling for SQL Stored Procedures

Learn how to develop and test a template for logging and error handling in a multi-step SQL stored procedure  Read more...
By Dwain Camps 2014/01/20 | Source: SQLServerCentral.com | Category: error handling
Rating: |  Discuss |   Briefcase | 9,536 reads

How to Design, Build and Test a Dynamic Search Stored Procedure

Learn how to design, build and test a dynamic search SP in just a few simple but methodical steps.  Read more...
By Dwain Camps 2015/03/06 (first published: 2013/11/05) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 19,313 reads

Performance of the SQL MERGE vs. INSERT/UPDATE

The SQL MERGE statement offers convenience, safety and elegance, but how does it perform compared to other methods?  Read more...
By Dwain Camps 2015/02/06 (first published: 2013/10/28) | Source: SQLServerCentral.com | Category: merge
Rating: |  Discuss |   Briefcase | 31,403 reads

Calculating Elapsed Times (SQL Spackle)

Calculating elapsed time between time values can be an interesting problem that is easily solved even when data anomalies are present.  Read more...
By Dwain Camps 2013/09/26 | Source: SQLServerCentral.com | Category: sql elapsed times
Rating: |  Discuss |   Briefcase | 6,890 reads

Variable Default Values to a Stored Procedure (SQL Spackle)

A way to assign variable and overrideable defaults to input parameters to an SP or FUNCTION using a configurations table.  Read more...
By Dwain Camps 2013/09/03 | Source: SQLServerCentral.com | Category: stored procedures
Rating: |  Discuss |   Briefcase | 6,866 reads

A Hazard of Using the SQL Update Statement

If you've never encountered this quirk of the SQL UPDATE statement, you should take a look and find a simple way around it.  Read more...
By Dwain Camps 2015/04/06 (first published: 2013/09/09) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 26,327 reads

A Hazard of Using the SQL Merge Statement

The SQL MERGE statement can make your DML querying more efficient but you need to take care or you may get burned  Read more...
By Dwain Camps 2013/04/03 | Source: SQLServerCentral.com | Category: merge
Rating: |  Discuss |   Briefcase | 15,369 reads

Departures from Origins and Arrivals at Destinations

A suggested design for creating flight schedules makes querying easy. Includes basic airport and airlines data. Get started now with this tricky query problem.  Read more...
By Dwain Camps 2012/12/11 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,495 reads

Double Counting and Sign Reversals

Make the ad-hoc analysis of identifying potentially double-counted or sign-reversed Accounting transactions simple and painless.  Read more...
By Dwain Camps 2013/01/07 | Source: SQLServerCentral.com | Category: bin packing
Rating: |  Discuss |   Briefcase | 3,919 reads

Splitting Strings Based on Patterns

Splitting strings based on patterns supported by LIKE and PATINDEX can be an interesting way to address a wide variety of problems.  Read more...
By Dwain Camps 2014/09/12 (first published: 2012/11/29) | Source: SQLServerCentral.com | Category: string manipulation
Rating: |  Discuss |   Briefcase | 19,118 reads

An Alternative (Better?) Method to UNPIVOT (SQL Spackle)

Normalizing or UNPIVOTing data may be improved by using this lesser known approach in SQL Server 2008 or later.  Read more...
By Dwain Camps 2014/09/26 (first published: 2012/08/02) | Source: SQLServerCentral.com | Category: cross apply values unpivot
Rating: |  Discuss |   Briefcase | 17,629 reads

Set Up Grouping Intervals for Excel (SQL Spackle)

So you want to group your data for charting in Excel? Here's how, the easy way!  Read more...
By Dwain Camps 2012/07/31 | Source: SQLServerCentral.com | Category: excel
Rating: |  Discuss |   Briefcase | 5,228 reads

Generating Non-uniform Random Numbers with SQL

Some FUNCTIONs to help generate non-uniform random numbers from uniform random numbers including Normal, Multinomial, etc.  Read more...
By Dwain Camps 2012/07/03 | Source: SQLServerCentral.com | Category: sql uniform random numbers
Rating: |  Discuss |   Briefcase | 6,583 reads
   Items 1 to 20 of 23    Older >>