SQL Clone
SQLServerCentral is supported by Redgate
 
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 1331    Older >>
 

Quick Tips For Debugging Large Stored Procedures

SSMS is a good management tool, but it’s not a good development tool. When you’re writing some simple queries, it’s fine. When you’re writing code with lots of branching, dynamic SQL, temp tables, error handling, and so on… Not so much. Here are some tips Erik darling has put together after a couple years of wrangling the Blitz scripts in the First Responder Kit.  Read more...
By Additional Articles 2018/06/01 | Source: Brent Ozar Unlimited Blog | Category: t-sql
Rating: (not yet rated)  Rate this |   Briefcase | 4,818 reads

TRY_CONVERT

An introduction to the TRY_CONVERT function, introduced in SQL Server 2012.  Read more...
By Matthew McGiffen 2018/05/29 | Source: SQLServerCentral.com | Category: try_convert()
Rating: |  Discuss |   Briefcase | 2,046 reads

One Million Tables

A quick experiment to create one million tables in a database.  Read more...
By Steve Jones 2018/05/10 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,344 reads

Friday the 13th

Looking forward to the next few ones of these scary days?  Read more...
By Jan Van der Eecken 2018/05/07 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 859 reads

Random Word Generation for Data Scrubbing

With HIPAA and GDPR requiring your careful scrubbing of data for lower environments, random word generation promises to be a huge helper. Read here how to do it.  Read more...
By John F. Tamburo 2018/05/01 | Source: SQLServerCentral.com | Category: rand()
Rating: |  Discuss |   Briefcase | 1,197 reads

SQL Server Closure Tables

SQL Server has a couple of different ways to represent hierarchies, but they do not allow storing any additional information that is important to the relationship between objects. In this article, Phil Factor explains how to use closure tables to overcome this deficiency.  Read more...
By Additional Articles 2018/04/27 | Source: SimpleTalk | Category: t-sql
Rating: (not yet rated)  Rate this |   Briefcase | 3,812 reads

Using T-SQL to Detect Stock Price Reversals with the RSI

Rick Dobson explains the Relative Strength Index (RSI), and shows how to create a TSQL script that computes the RSI for a stock closing price series.  Read more...
By Additional Articles 2018/04/16 | Source: MSSQLTips.com | Category: t-sql
Rating: (not yet rated)  Rate this |   Briefcase | 3,003 reads

TRIM() in T-SQL

The T-SQL language expanded in SQL Server 2017 with the TRIM() function.  Read more...
By Steve Jones 2018/04/10 | Source: SQLServerCentral.com | Category: trim()
Rating: |  Discuss |   Briefcase | 1,899 reads

Avoiding Unexpected Results with DATEDIFF in Year Comparisons

Learn how to avoid unexpected results when using the DATEDIFF function to find the difference between two dates in years.  Read more...
By David Strack 2018/04/09 | Source: SQLServerCentral.com | Category: sql server
Rating: |  Discuss |   Briefcase | 1,346 reads

Storing a variable with a SELECT, and why it didn't work.

Using SELECT to store values into variables is an important technique, but you need to know some of the gotchas as well.  Read more...
By Kenneth Fisher 2018/04/02 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,813 reads

When to use the SELECT…INTO statement

SELECT…INTO is a good way of making a table-source temporarily persistent as part of a process, if you don’t care about constraints, indexes or special columns.  Read more...
By 2018/03/30 | Source: Redgate | Category: t-sql
Rating: (not yet rated)  Rate this |   Briefcase | 5,618 reads

Get Set For Speed

Loops are common in application code, but set-based solutions are the way to go with SQL.  Read more...
By Tom Staab 2018/02/23 (first published: 2015/12/29) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 6,153 reads

The COUNT Function in T-SQL

The COUNT function is among the most used functions in the T-SQL codes. Even though COUNT is easy to use, it should be used carefully because it could often not return the desired result. For the big tables, the counting of the rows could cause blocking as well as take some more time.  Read more...
By Igor Micev 2018/02/09 (first published: 2016/07/12) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 7,180 reads

Sending table form HTML emails from a SQL Server database engine

The solution which helps to smiplify delivery of a table content in the HTML form using Database mail  Read more...
By Evgeny Garaev 2018/01/29 | Source: SQLServerCentral.com | Category: database mail
Rating: |  Discuss |   Briefcase | 1,604 reads

Nasty Fast PERCENT_RANK

Alan Burstein discusses a better performning alternative to PERCENT_RANK that works on SQL Server versions 2005+  Read more...
By Alan Burstein 2018/01/05 (first published: 2016/06/07) | Source: SQLServerCentral.com | Category: percent_rank
Rating: |  Discuss |   Briefcase | 5,192 reads

Securing Reporting Services Reports

Learn how you can get the userid of someone connected to Reporting Services and use that information to determine if they can view the report.  Read more...
By Mohamed Idttalbe 2017/12/22 (first published: 2010/05/18) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 7,965 reads

Holidays and Calendar Generation

Create the definition of your holidays and have them available for any year. Create a Calendar including holidays and business/work dates.  Read more...
By Paul Hunter 2017/12/15 (first published: 2016/02/16) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 4,693 reads

Bones of SQL – Grouping By User-Defined Calendar Periods

Although it is common to group by periods such as Week, Month, or Quarter, sometimes alternative periods are needed. This simple technique lets you split a year into periods with any number of days.  Read more...
By Bob Hovious 2017/12/08 (first published: 2016/09/26) | Source: SQLServerCentral.com | Category: date manipulation
Rating: |  Discuss |   Briefcase | 2,475 reads

Bones of SQL - Practical Calendar Queries

After the first article created a Calendar table, learn how to use this in a practical sense with some common queries.  Read more...
By Bob Hovious 2017/12/01 (first published: 2016/10/13) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 3,396 reads

The Difference Between Rollup and Cube

Learn about the fundamental differences between the ROLLUP and CUBE operators.  Read more...
By Ben Richardson 2017/11/30 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,597 reads
<< Newer    Items 21 to 40 of 1331    Older >>