SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Articles with tag formatting Rss

Search for any content tagged formatting

   Items 1 to 14 of 14   
 

Using multiple custom SQL formatting styles in SQL Prompt

Usually, when coding SQL, you will want to go along with the coding style of the team you are working with. This article shows how to use SQL Prompt formatting styles to create and maintain multiple code styles, each for a dedicated purpose, and to switch between them and apply a new style to existing code, with ease.  Read more...
By 2017/08/14 | Source: Redgate | Category: t-sql
Rating: (not yet rated)  Rate this |   Briefcase | 3,820 reads

The Basics of Good T-SQL Coding Style – Part 2: Defining Database Objects

Technical debt is a real problem in database development, where corners have been cut in the rush to keep to dates. The result may work but the problems are in the details: such things as inconsistent naming of objects, or of defining columns; sloppy use of data types, archaic syntax or obsolete system functions. With databases, technical debt is even harder to pay back. Robert Sheldon explains how and why you can get it right first time instead.  Read more...
By Additional Articles 2017/07/25 | Source: SimpleTalk | Category: t-sql
Rating: (not yet rated)  Rate this |   Briefcase | 5,535 reads

The Basics of Good T-SQL Coding Style

TSQL Code must work properly and efficiently. That's not enough though. Unless you are working alone, have perfect memory and plan to never change job, then you need to comment and document your code, it must be inherently readable, well laid out, use informative and obvious names, and it must be robust and resilient; written defensively. It must not rely on deprecated features of SQL Server, or assume particular database settings. Robert Sheldon starts a series of articles that explains the basics.  Read more...
By Additional Articles 2017/07/05 | Source: SimpleTalk | Category: t-sql
Rating:  Rate this |   Briefcase | 5,768 reads

The Louis Davidson custom style for SQL Prompt

In this article, Louis Davidson sticks his neck out, and offers what he believes is a sensible code formatting style, based on twenty-plus years of writing SQL. The result is the Louis Davidson custom SQL Prompt style that you can download using the link at the end of the post, try out, and adapt as required.  Read more...
By 2017/06/30 | Source: Redgate | Category: sql
Rating: (not yet rated)  Rate this |   Briefcase | 4,615 reads

How to implement a SQL formatting standard using SQL Prompt v8

With ten programmers working on the same project, how do you agree on a standard style for formatting SQL code, and then implement it consistently? One way is through draconian rules, meeting after meeting, and the occasional sacrifice of a programmer to put the fear in those who remain. Another way is using SQL Prompt, Louis Davidson shows how.  Read more...
By 2017/06/16 | Source: Redgate | Category: formatting
Rating: (not yet rated)  Rate this |   Briefcase | 4,459 reads

How to style your SQL using SQL Prompt’s new formatting options

Prefer tabs but your teammates use spaces? That's not a problem with the brand new formatting options in SQL Prompt. It's now possible to customize, save, and share multiple styles that you can then quickly switch between when working. Here's how it works, and how to get set up.  Read more...
By Additional Articles 2017/06/06 | Source: Redgate | Category: formatting
Rating: (not yet rated)  Rate this |   Briefcase | 3,573 reads

How to implement a T-SQL code formatting standard using SQL Prompt

Louis Davidson shows how to save a defined SQL formatting style as a shareable template that you can quickly share with your coworkers.  Read more...
By Additional Articles 2017/05/02 | Source: Redgate | Category: formatting
Rating: (not yet rated)  Rate this |   Briefcase | 5,186 reads

Who the Devil Wrote This SQL Code?

The way that you format T-SQL code can affect the productivity of the people who have to subsequently maintain your work. It is never a good experience to see SQL Code, cry out “Who the devil wrote this code?”, and then realise that it was you. Grant gives some examples of bad formatting and explains why you should never check-in badly-formatted SQL code.  Read more...
By Additional Articles 2016/11/29 | Source: SimpleTalk | Category: formatting
Rating:  Rate this |   Briefcase | 5,857 reads

Formatting SQL Code - Part the Second

When you're formatting SQL Code, your objective is to make the code as easy to read with understanding as is possible, in a way that errors stand out. The extra time it takes to write code in an accessible way is far less than the time saved by the poor soul in the future, possibly yourself, when maintaining or enhancing the code. There isn't a single 'best practice, but the general principles, such as being consistent, are well-established. Joe Celko gives his take on a controversial topic.  Read more...
By Additional Articles 2016/08/30 | Source: SimpleTalk | Category: simple talk
Rating:  Rate this |   Briefcase | 8,462 reads

Using Comments to Quickly Test CTEs

A quick tip for using a combination of block and line comments to test CTEs   Read more...
By Carl P. Anderson 2014/11/10 | Source: SQLServerCentral.com | Category: formatting
Rating: |  Discuss |   Briefcase | 7,305 reads

Formatting Dates with 3 Character Months (SQL Spackle)

Another in the series of articles to help you "fill in the cracks" in your T-SQL knowledge. MVP Jeff Moden shows us a super simple, high performance method to solve this timeless problem.  Read more...
By Jeff Moden 2013/07/19 (first published: 2011/01/20) | Source: SQLServerCentral.com | Category: formatting
Rating: |  Discuss |   Briefcase | 18,130 reads

Performance Test of New Date Manipulation Functions (SQL Spackle)

Performance test of new SQL 2012 functions DateTimeFromParts and Format  Read more...
By Wayne Sheffield 2012/05/10 | Source: SQLServerCentral.com | Category: performance tuning
Rating: |  Discuss |   Briefcase | 5,938 reads

SQL Validation Functions - 4 Cool UDF's to have handy

Everyone knows that in SQL 2000, yes 2000, Microsoft jumped aboard the bandwagon of other platforms, and gave the developers...  Read more...
By Robert Pearl 2011/04/07 | Source: SQLServerCentral.com | Category: blogs
Rating:  Rate this |   Briefcase | 11,971 reads

Formatting Dates with 3 Character Months (SQL Spackle)

Another in the series of articles to help you "fill in the cracks" in your T-SQL knowledge. MVP Jeff Moden shows us a super simple, high performance method to solve this timeless problem.  Read more...
By Jeff Moden 2013/07/19 (first published: 2011/01/20) | Source: SQLServerCentral.com | Category: formatting
Rating: |  Discuss |   Briefcase | 18,130 reads
   Items 1 to 14 of 14