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

Content with tag SQL PROMPT Rss

   Items 1 to 20 of 60    Older >>
 

SQL Prompt Code Analysis: Avoid using the ISNUMERIC Function (E1029)

Avoid using the IsNumeric() function, because it can often lead to data type conversion errors, when importing data. SQL Prompt Code Analysis rules include an Execution rule, E1029, which will alert you to use of this function, in your T-SQL. If you’re working on SQL Server 2012 or later, it’s much better to use the Try_Convert()or Try_Cast() function instead. On earlier SQL Server versions, the only way to avoid it is by using LIKE expressions.  Read more...
By 2018/09/11 | Source: Redgate | Category: sql prompt
Rating:  Rate this |   Briefcase | 2,986 reads

Phil Factor brings us more SQL Prompt Code Analysis, this time INSERT INTO a permanent table with ORDER BY (PE020)

Phil Factor brings us more SQL Prompt Code Analysis, this time INSERT INTO a permanent table with ORDER BY (PE020)  Read more...
By 2018/08/30 | Source: Redgate | Category: sql prompt
Rating: (not yet rated)  Rate this |   Briefcase | 2,562 reads

SQL Prompt code analysis: avoid non-standard column aliases

Phil Factor looks at SQL Prompt code analysis; column alias violations and the right way to alias  Read more...
By 2018/08/16 | Source: Redgate | Category: sql prompt
Rating: (not yet rated)  Rate this |   Briefcase | 2,895 reads

SQL Prompt code analysis: avoiding the old-style TOP clause

Phil Factor discusses SQL Prompt code analysis and the necessity for bracketed, or parenthesized, expressions.  Read more...
By 2018/07/27 | Source: Redgate | Category: sql prompt
Rating: (not yet rated)  Rate this |   Briefcase | 4,318 reads

Improving legacy code using SQL Prompt code analysis

Tom Walsh explains how to use Redgate's SQL Prompt to improve legacy code  Read more...
By 2018/07/13 | Source: Redgate | Category: sql prompt
Rating: (not yet rated)  Rate this |   Briefcase | 2,570 reads

SQL Prompt Hidden Gems: The SSMS Results Pane

Louis Davidson explores the hidden treasures within SQL Prompt right-click context menu when working in the SSMS grid format results pane.  Read more...
By 2018/06/21 | Source: Redgate | Category: sql prompt
Rating: (not yet rated)  Rate this |   Briefcase | 3,452 reads

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 | 3,798 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,788 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,155 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,152 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 | 5,179 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,200 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,627 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,632 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,589 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 | 4,178 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,700 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,315 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 | 4,227 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,722 reads
   Items 1 to 20 of 60    Older >>
 
Tags
redgate (28)    
code analysis (5)    
formatting (5)    
quick tips (4)    
snippets (4)    
code smells (3)    
order by (2)    
redgate software (2)    
static code analysis (2)    
technical debt (2)    
adventureworks (1)    
alias (1)    
blogs (1)    
coding standards (1)    
delete (1)    
execution warnings (1)    
group by (1)    
insert into (1)    
isnumeric() (1)    
join (1)    
money (1)    
not in (1)    
product reviews (1)    
scalar functions (1)    
set nocount (1)    
sql (1)    
sql compare (1)    
sql server management studio (1)    
survey (1)    
templates (1)    
top (1)    
t-sql (1)    
update (1)    
where (1)