SQLServerCentral - www.sqlservercentral.com

A community of more than 1,600,000 database professionals and growing

Featured Contents

The Voice of the DBA

Byte Me: Paranormal Presence

Bob Lang from SQLServerCentral.com

Join the debate, and respond to today's editorial on the forums

ADVERTISEMENT
SQL Monitor

New SQL Monitor Reporting Module

SQL Monitor now includes a new Reporting module. It allows you to create customized reports, combining the individual server performance metrics available in SQL Monitor with summary information on your entire SQL Server estate. These reports can then be exported to pdf and emailed to you on a scheduled basis. Download SQL Monitor now and get a 14 day free trial

SQL Compare

The industry standard for comparing and deploying SQL Server database schemas

Trusted by 71% of Fortune 100 companies, SQL Compare is the fastest way to compare changes, and create and deploy error-free scripts in minutes. Plus you can easily find and fix errors caused by database differences. Download your free trial

Featured Contents

 

Machine Learning for Outlier Detection in R

Nick Burns from SQLServerCentral.com

A look into clustering to detect outliers in R. An extension on univariate statistical tests to include multivariate data. More »


 

Free eBook: Fundamentals of SQL Server 2012 Replication

Press Release from Redgate

Fundamentals of SQL Server 2012 Replication provides a hands-on introduction to SQL Server replication. The book introduces you to the technologies that make up replication, and then walks you through setting up different replication scenarios. When you've finished reading, you should be able to implement your own multi-server replication setup while following the principle of least privilege. More »


 

The Basics of Good T-SQL Coding Style

Additional Articles from SimpleTalk

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. More »


 

From the SQLServerCentral Blogs - Geo Location of Twitter messages in Power BI

Rayis Imayev from SQLServerCentral Blogs

[2017-June-25] There are several custom solutions that make Twitter messages analysis possible in Power BI. And with a recent addition of... More »


 

From the SQLServerCentral Blogs - The Three A’s: Authentication

Brian Kelley from SQLServerCentral Blogs

When I start talking with folks about security, one of the areas of confusion I often find has to do... More »

Question of the Day

Today's Question (by Steve Jones):

I write this in R:

 Exclamation <- c('SQL', 'Server', 'is', 'great!') 

If I then run this, what is returned?

 Exclamation[1] 

Think you know the answer? Click here, and find out if you are right.


We keep track of your score to give you bragging rights against your peers.
This question is worth 1 point in this category: R Language.

We'd love to give you credit for your own question and answer.
To submit a QOTD, simply log in to the Contribution Center.

ADVERTISEMENT

SQL Server T-SQL Recipes

SQL Server T-SQL Recipes is an example-based guide to the Transact-SQL language that is at the core of SQL Server. This edition has been lightly updated for SQL Server 2014 and provides ready-to-implement solutions to common programming and database administration tasks. Learn to create databases, create in-memory tables and stored procedures, insert and update data, generate reports, secure your data, and more. Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

How many days since the Declaration of Independence was signed in 1776?

Answer: SELECT DATEDIFF(dw, '17760704', '20170704')

Explanation:

Since July 4, 1776, there have been 88023 days. The DATEDIFF function is the one to use, with the start date before the end date.

Ref: DATEDIFF - click here


» Discuss this question and answer on the forums

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.

SQL Server 2016 : SQL Server 2016 - Administration

SQL 2016 SP1 CU2 - sudden and unexplained shutdowns - Hi there, Anyone had problems with unplanned instance shut-downs on SQL 2016 SP1 CU2? We patched our Data Warehouse to CU2 in...

Performance regression after SQL Server upgrade - HI All, I am currently in a situation whereby i have migrated 2 databases from SQL Server 2008 to SQL Server...


SQL Server 2016 : SQL Server 2016 - Development and T-SQL

Stored Procedures for document Numbers - CNCB    17    1 CNPO    17    1 CNCP    17    3 PRT    17    5 POD    17    7 SCT    17    8 EMAIL    17&

SQL Streaks - Hi I wish to calculate several flags for the streaks in SQL I have added the tables and the desired table I...

query table with child-parent hierarchy with history - I have different tables that work with child-parent hierarchy, this is easy with just a "parent" column that indicates to...


SQL Server 2014 : Administration - SQL Server 2014

Splitting TempDB - Hi, I noticed yesterday that I have the following setup for one of my production virtual database servers: 1 socket, 8...


SQL Server 2014 : Development - SQL Server 2014

Using Lead And Lag Functions As A Means Of Navugating Back And Forth In A Recordset - Hi Guys, I have been doing some reading online and discovered the Lead and Lag Functions.  According to what I have...

General advice needed - database design - Is this a bad way to design a pricing table? - Suppose we are selling bottles of water that can be bought in sizes of 1 to 10 litres (1, 2,...


SQL Server 2012 : SQL 2012 - General

Reasons to have Mirroring AND local backups? - Hi all, One of my clients has both of these for the same server.  For my own understanding I'd like to...


SQL Server 2012 : SQL Server 2012 - T-SQL

How to find all procs in a DB which cross reference other databases - Hi All I need to find all procs from a database which reference tables from another databases. all my DB has...

Integer to Big Integer and foreign keys - We need to convert an integer column to big int in the EVENT table.  Since the PK ( event_id ) is found...

Cross Apply Timing Out on Large (1bn rows) Table - I have a small table Members (1000 rows) that contains member information. I have a large view History (1bn rows) that...

How does a stored procedure takes 15 seconds to start? - The trace attached shows a stored procedure calling another stored procedure. The statement calling the inner procedure takes 18 seconds while...

What's the best way to get a sample set of a big table without primary key? - This is what is happening here: We have lots of big data, table's size is often around billion and there is...


SQL Server 2008 : SQL Server 2008 - General

SQL Server Transactional Replication and Reinitializing a subscription - The Production Publication Database is very large and is running on SQL Server 2008 R2. The Subscriber Database is in...

How much memory does SQL server Really need? - Hi All,   How do we know how much memory does

CPU troubleshooting with Perfom counters - I have put 2 PERFMON counters to troubleshoot high CPU utilization due to SQL server 2008 on a windows host...


Data Warehousing : Integration Services

How can we load more than 6 million records into excel sheet - Output of the new report will be more than million records (ex : 6 million records) Could you please check how...


Data Warehousing : Data Transformation Services (DTS)

SSIS CopyObjectLevelPermissions broken? - I have scoured the internet but cannot find a definitive answer. I need to copy the users/roles and object level...


SQLServerCentral.com : SQLServerCentral.com Website Issues

How to find a post from “My Posts” quickly? - If there are hundreds or thousands posts, do I have to go through the whole list page by page? Can we...

This email has been sent to newsletter@newslettercollector.com. To be removed from this list, please click here.
If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com.
This newsletter was sent to you because you signed up at SQLServerCentral.com.
Feel free to forward this to any colleagues that you think might be interested.
If you have received this email from a colleague, you can register to receive it here.
This transmission is ©2017 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com