Tags » T-SQL

Keyboard Shortcuts Part 2: SQL Prompt Snippets, AutoComplete & Action List

I absolutely love SQL Prompt – it’s what SSMS’s Intellisense should be. Here’s a few ways you can utilize it. 243 more words

SQL Keyboard Shortcuts

Keyboard Shortcuts Part 1: Text Manipulation

Ok, so your code won’t be faster. But if you can type the code quicker, you can begin fixing, refactoring or moving onto the next problem sooner. 312 more words

SQL Keyboard Shortcuts

A faster Fibonacci series in T-SQL

Fibonacci’s numbers are a sequence of numbers calculated using a recursion pattern that typically lends itself more to procedural programming. This makes it trickier to implement in a well-performing solution in T-SQL, as T-SQL is set-based. 449 more words


SQL Jobs - On a Calendar?

SQL Server backup jobs are IO-intensive, he says, stating the obvious.

When you have a lot of servers which have been set up over the years, and you’re new to the environment, and want to see when storage is being hammered , you might end up thinking that a calendar view might be of help – I know I did. 1,684 more words

SQLServerPedia Syndication

Windowed DISTINCT aggregates

You may have discovered that the use of DISTINCT is not supported in windowed functions. A query that uses a distinct aggregate in a windowed function, 407 more words


Copy NAV Data between companies and databases using SQL

This post is entirely based on the following script by Kine
http://dynamicsuser.net/nav/b/kine/posts/copy-microsoft-dynamics-nav-company-by-sql-script-into-another-database-v2. If you read the comments you will note that a few people found bugs and Kine suggested he had some fixes, but I cannot find anything else. 1,052 more words

Dynamics NAV

Get the number of deleted records

打字猴最近在寫SQL的時候需要得知從某個table中delete/update/insert的records有幾筆,以便顯示在UI上,或是用來給後面的程式判斷是否需要做其他的task(如果沒有delete/insert/update任何data的話,後面的task就不需要做了)。 197 more words