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

Articles with tag T-SQL Rss

Search for any content tagged t-sql

<< Newer    Items 21 to 40 of 1141    Older >>
 

Unexpected View Performance

Views that use implicit conversion to return result sets may use a different query plan than the statement executed in query analyzer.  Read more...
By Thom Bolin 2014/04/18 (first published: 2011/01/11) | Source: SQLServerCentral.com | Category: views
Rating: |  Discuss |   Briefcase | 13,692 reads

Stairway to T-SQL: Beyond The Basics Level 6: Using the CASE Expression and IIF Function

There are times where you need to write a single T-SQL statement that is able to return different T-SQL expressions based on the evaluation of another expression. When you need this kind of functionality you can use the CASE expression or IIF function to meet this requirement. In this Stairway level Gregory Larsen reviews the CASE and IIF syntax and showing you examples of how the CASE expression and IIF function.  Read more...
By Gregory Larsen 2014/04/09 | Source: SQLServerCentral.com | Category: stairway series
Rating: |  Discuss |   Briefcase | 9,969 reads

Divide and Conquer - Performance Tuning

Sometimes we need to break down a complex problem into a multiple stage solution to achieve optimal performance  Read more...
By Claire Mora 2014/04/08 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 7,566 reads

Stairway to T-SQL: Beyond The Basics Level 5: Storing Data in Temporary Tables

There are times when retrieving data for complex business requirement requires you to temporarily store one or more results sets for a short period of time. Typically these temporary tables are stored in the scope of the current connection, but they may also need to be available across multiple connections.   Read more...
By Gregory Larsen 2014/04/02 | Source: SQLServerCentral.com | Category: stairway series
Rating: |  Discuss |   Briefcase | 8,646 reads

Using EXCEPT to Determine Row Differences

How to use the EXCEPT statement to perform row differences.  Read more...
By M. Douglas Bowan II 2014/03/25 | Source: SQLServerCentral.com | Category: except
Rating: |  Discuss |   Briefcase | 16,700 reads

On Handling Dates in SQL

The handling of dates in TSQL is complex - when SQL Server was Sybase, it was forced by the lack of prevailing standards in SQL to create its own ways of processing and formatting dates and times. Joe Celko looks forward to a future when it is possible to write standard SQL date-processing code with SQL Server.  Read more...
By Additional Articles 2014/03/21 | Source: SimpleTalk | Category: dates and conversion
Rating:  Rate this |   Briefcase | 6,515 reads

Stairway to T-SQL: Beyond The Basics Level 4: Using Views to Simplify Your Query

This level discusses how to use a database VIEW to simplify your Transact-SQL(T-SQL) code. By understanding how to use a VIEW you will be able to better support writing T-SQL code to meet complex business requirements. In this article I will be discussing what a database VIEW is and then providing a number of examples to help you understand how you can use a VIEW to implement different coding scenarios.  Read more...
By Gregory Larsen 2014/03/19 | Source: SQLServerCentral.com | Category: stairway series
Rating: |  Discuss |   Briefcase | 7,662 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,204 reads

Having fun with PARSENAME (SQL Spackle)

PARSENAME is perhaps the most infrequently used built-in documented function in SQL Server. SQL Server Microsoft Certified Master Wayne Sheffield shows why this nifty function ought to be included in your SQL toolbox.  Read more...
By Wayne Sheffield 2014/03/17 | Source: SQLServerCentral.com | Category: parsename
Rating: |  Discuss |   Briefcase | 9,722 reads

Stairway to T-SQL: Beyond The Basics Level 3: Building a Correlated Subquery

This stairway level will expand on the subquery topic by discussing a type of subquery known as a correlated subquery, and explores what a correlated subquery is and how it is different from a normal subquery.  Read more...
By Gregory Larsen 2014/03/05 | Source: SQLServerCentral.com | Category: stairway series
Rating: |  Discuss |   Briefcase | 10,022 reads

Join Operations – Hash Match

The way in which SQL Server chooses to join your tables in a query can dramatically affect performance. In this article, Jason Brimhall explains how a hash match works and shows some performance numbers.  Read more...
By Jason Brimhall 2014/03/04 | Source: SQLServerCentral.com | Category: execution plans
Rating: |  Discuss |   Briefcase | 8,326 reads

Calendar Tables III - Changing Business Rules

The client wants to change a date based business rule  Read more...
By Todd Fifield 2014/02/28 (first published: 2011/02/16) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 12,860 reads

Fixing CREATE TABLE

Steve Jones has a problem with the inconsistency of the CREATE TABLE statement in SQL Server and has an idea on what to do.  Read more...
By Steve Jones 2014/02/27 | Source: SQLServerCentral.com | Category: editorial
Rating: (not yet rated) |  Discuss |   Briefcase | 232 reads

A Quick Tour of sp_ExecuteSQL

sp_ExecuteSQL can be used to dynamically execute T-SQL code. Learn how to use it and how to add parameters to control what code is executed.  Read more...
By Jonathan Allen 2014/02/24 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 8,134 reads

Calendar Tables II - The Anchor

Show the results for a date even if there is no data.  Read more...
By Todd Fifield 2014/02/21 (first published: 2010/08/16) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 14,876 reads

Calendar Tables

Learn how to avoid complex date calculations and increase performance using calendar tables in this article from Todd Fifield.  Read more...
By Todd Fifield 2014/02/14 (first published: 2010/07/15) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 38,257 reads

Sending a Variable Number of Elements in a Parameter

What are your options for sending a variable number of choices in a parameter to a stored procedure? Alex Grinberg looks at three techniques you can use.  Read more...
By Alex Grinberg 2014/02/06 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 8,439 reads

The Performance of the T-SQL Window Functions

Window Functions in SQL greatly simplify a whole range of financial and statistical aggregations on sets of data. Because there is less SQL on the page, it is easy to assume that the performance is better too: but is it? Dwain gets out the test harness to investigate.  Read more...
By Additional Articles 2014/02/06 | Source: SimpleTalk | Category: t-sql
Rating:  Rate this |   Briefcase | 4,067 reads

Finding “Active” Rows for the Previous Month (SQL Spackle)

SQL Server MVP Jeff Moden walks us through the classic problem of finding all the "Active" rows for the previous month using start and end dates. This is excellent for those new to T-SQL.  Read more...
By Jeff Moden 2014/01/30 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 6,118 reads

Backup to the right location, by default

How do you configure where your database backups are created? Do you have problems updating all of your backup jobs if the backup location needs to change? See how you can make use of Windows settings and a few lines of simple TSQL to have total control over where you database backups are created.   Read more...
By Additional Articles 2014/01/30 | Source: SimpleTalk | Category: backup
Rating:  Rate this |   Briefcase | 2,259 reads
<< Newer    Items 21 to 40 of 1141    Older >>