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

Content with tag SQL PROMPT Rss

   Items 1 to 20 of 54    Older >>
 

Finding code smells using SQL Prompt: Asterisk in SELECT list

In this article Phil Factor explains how to find code smells using SQLPrompt: Asterisk in SELECT list  Read more...
By 2018/06/15 | Source: Redgate | Category: sql prompt
Rating:  Rate this |   Briefcase | 2,259 reads

SQL Prompt Safety Net Features for Developers

Phil Factor describes a few common mishaps that everyone working in SSMS will have experienced a couple of times, and how SQL Prompt “Tab Magic” (now more prosaically called Tab Color and Tab History) provides ‘insurance’ against their consequences.  Read more...
By 2018/06/11 | Source: Redgate | Category: sql prompt
Rating: (not yet rated)  Rate this |   Briefcase | 2,200 reads

Building reusable table build scripts using SQL Prompt

You’ve been working on a query, function or procedure and you want to store the results of executing it in a table; maybe a table variable, or a temporary table. These all require column definitions, and such things can be tiresome to do. Phil Factor demonstrates how to use SQL Prompt to do most of the mindless tasks that you’d otherwise be obliged to undertake by hand.  Read more...
By 2018/06/04 | Source: Redgate | Category: sql prompt
Rating: (not yet rated)  Rate this |   Briefcase | 3,020 reads

Finding code smells using SQL Prompt: TOP without ORDER BY in a SELECT statement

SQL Server’s TOP clause in a SELECT statement is very useful and intuitive, but it allows you to leave out the associated ORDER BY clause that clarifies what you had in mind: TOP by what aspect? Phil Factor explains how to find code smells using SQL Prompt: TOP without ORDER BY in a SELECT statement   Read more...
By 2018/05/28 | Source: Redgate | Category: sql prompt
Rating: (not yet rated)  Rate this |   Briefcase | 3,064 reads

Avoid use of the MONEY and SMALLMONEY datatypes

One of SQL Prompt's code analysis recommendations is that you avoid using the MONEY and SMALLMONEY datatypes - this article from Phil Factor explains why.  Read more...
By 2018/05/04 | Source: Redgate | Category: code analysis
Rating:  Rate this |   Briefcase | 4,589 reads

Beyond Formatting: Improving SQL Code using SQL Prompt Actions

This article shows how to use the SQL Prompt actions that you can apply as part of the Format SQL command. These actions are designed to help improve the overall quality of your SQL code, in various subtle but meaningful ways, such as qualifying object names, standardizing the use of aliases, adding semicolons to the end of statements, and removing unnecessary square brackets around object names.  Read more...
By 2018/04/02 | Source: Redgate | Category: redgate
Rating: (not yet rated)  Rate this |   Briefcase | 3,072 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,501 reads

Driving up database coding standards using SQL Prompt

This article will demonstrate how a team can use SQL Prompt to establish and share coding standards, through code analysis rules, formatting styles and code snippets.  Read more...
By 2018/03/29 | Source: Redgate | Category: coding standards
Rating: (not yet rated)  Rate this |   Briefcase | 3,530 reads

Consider using [NOT] EXISTS instead of [NOT] IN (subquery)

The query optimizer now treats EXISTS and IN the same way, whenever it can, so you’re unlikely to see any significant performance differences. Nevertheless, you need to be cautious when using the NOT IN operator if the subquery’s source data contains NULL values. If so, you should consider using a NOT EXISTS operator instead of NOT IN, or recast the statement as a left outer join.  Read more...
By 2018/03/13 | Source: Redgate | Category: not in
Rating: (not yet rated)  Rate this |   Briefcase | 5,458 reads

Misuse of the scalar user-defined function as a constant

If you use an unverified scalar function, then the query will be grindingly slow because you will be executing it on every row whether it has a parameter or not. This post explains the issue in more depth, and shows how SQL Prompt code analysis rules can help you avoid it altogether.   Read more...
By 2018/03/05 | Source: Redgate | Category: redgate
Rating:  Rate this |   Briefcase | 3,755 reads

Customizing the SQL Prompt built-in snippets: a better ‘ata’ snippet

Snippets are a great feature of SQL Prompt - they save coding time, and introduce standards and consistency to the way you build code modules. But did you know you can customize them? Phil Factor shows how by using ALTER TABLE ADD as an example.  Read more...
By 2018/02/27 | Source: Redgate | Category: redgate
Rating:  Rate this |   Briefcase | 2,616 reads

Avoid T-SQL Technical Debt using SQL Prompt Code Analysis

SQL Prompt’s new Code Analysis feature helps you discover code issues and hidden pitfalls during code development, as you type. In this article, Catherine shows how the Code Analysis feature works, and illustrates how to use the feature to improve the quality of your team’s SQL code.  Read more...
By 2018/02/23 | Source: Redgate | Category: redgate
Rating: (not yet rated)  Rate this |   Briefcase | 3,209 reads

How to reformat a database in one operation

Inherited a database from another team? Changed your team policy on the way that you format SQL? What’s to stop you formatting the code of an entire database nicely, when you’re developing it? It can be done, but the process can take longer than you expect. This article will demonstrate a simple 3-step approach to reformatting a whole database to your standard, in a single operation, using SQL Compare and SQL Prompt.  Read more...
By 2018/02/19 | Source: Redgate | Category: redgate
Rating:  Rate this |   Briefcase | 3,908 reads

How to Test SQL Server Functions and Procedures using SQL Prompt

When writing functions or procedures, a common chore is to devise and implement the tests that ensure that the routine always works as expected.  Read more...
By 2018/02/15 | Source: Redgate | Category: redgate
Rating: (not yet rated)  Rate this |   Briefcase | 3,616 reads

How to use the SQL Prompt snippet placeholders for selecting and copying text

There are four SQL Prompt snippet placeholders that are all about selection and copying of text. These placeholders are very handy if, for example, you have two blocks of code that need to be part of a snippet. One part you hold on the clipboard, and the other part is a block of snippet text, selected using the $SELECTEDTEXT$ placeholder.  Read more...
By 2018/02/07 | Source: Redgate | Category: redgate
Rating: (not yet rated)  Rate this |   Briefcase | 2,181 reads

Finding code smells using SQL Prompt: the SET NOCOUNT problem

SQL Prompt implements two static code analysis rules to check code for potential misuse of the SET NOCOUNT command. In this post, Phil Factor explains the issue.  Read more...
By 2018/01/25 | Source: Redgate | Category: redgate
Rating: (not yet rated)  Rate this |   Briefcase | 3,673 reads

Finding code smells using SQL Prompt: old-style join syntax

SQL Prompt implements a static code analysis rule which will check code automatically for occurrences of non-ANSI standard JOIN syntax - here's how it works.  Read more...
By 2018/01/18 | Source: Redgate | Category: redgate
Rating:  Rate this |   Briefcase | 4,110 reads

Finding code smells using SQL Prompt: procedures that lack schema-qualification

It is a very good idea to get into the habit of qualifying the names of procedures with their schema. It is not only makes your code more resilient and maintainable, but as Microsoft introduces new features that use schemas, such as auditing mechanisms, you code contains no ambiguities that could cause problems.  Read more...
By 2018/01/12 | Source: Redgate | Category: redgate
Rating:  Rate this |   Briefcase | 4,669 reads

6 reasons why your development team needs SQL Prompt

While SQL Prompt cannot turn an unskilled database programmer into a SQL hero, it will drive up the productivity of a typical multi-skilled development team, and reduce reliance on specialist database developers.  Read more...
By 2018/01/08 | Source: Redgate | Category: redgate
Rating: (not yet rated)  Rate this |   Briefcase | 3,636 reads

How you can improve your SQL with code analysis in SQL Prompt

You could think of the code analysis feature in SQL Prompt as a machine-assisted code review. The rules that are used to check your code point out questionable areas that might be missed during regular testing.  Read more...
By 2018/01/02 | Source: Redgate | Category: redgate
Rating: (not yet rated)  Rate this |   Briefcase | 3,806 reads
   Items 1 to 20 of 54    Older >>
 
Tags
redgate (28)    
formatting (5)    
quick tips (4)    
snippets (4)    
code analysis (3)    
code smells (2)    
redgate software (2)    
static code analysis (2)    
adventureworks (1)    
blogs (1)    
coding standards (1)    
delete (1)    
execution warnings (1)    
group by (1)    
join (1)    
money (1)    
not in (1)    
order by (1)    
product reviews (1)    
scalar functions (1)    
set nocount (1)    
sql (1)    
sql compare (1)    
survey (1)    
technical debt (1)    
templates (1)    
top (1)    
t-sql (1)    
update (1)    
where (1)