SQLServerCentral - www.sqlservercentral.com

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

Featured Contents

The Voice of the DBA

Why not take a risk and try something new?

Today we have a guest editorial as Steve is out of the office.

I don’t know about you, but I am pretty set in my ways. I have a routine and it is pretty consistent. I am not a huge risk taker. I tend to play it safe. So, what does it take to try something new? To take a risk and go into uncharted territory. To risk failure, but also a chance at success? For me, I guess all I needed was a bit of encouragement.

First, we must look at why we should try something new or take a risk. Sometimes it is hard to see what benefit might come from something new. If there is a risk, then is any reward really worth the possible failure? I believe trying something new and taking a chance can lead to good things. This is not always true of course, sometimes you can get the short end of the stick, and things don’t turn out as you had hoped. Still, the chance to discover something new that you enjoy; that you are good at can be very rewarding.

Writing these articles is something new that I tried several years ago. I appreciate Steve Jones sending a call out for people to write more articles; it was the encouragement I needed to give it a go. I wasn’t sure if I would be successful. I didn’t know if people would enjoy or appreciate the things I was writing about. I haven’t always done the best job. I am human and make mistakes or say things I shouldn’t. I haven’t always received positive responses, but I have learned that I enjoy writing more than I thought. Also, I do believe some people have enjoyed and perhaps benefited from things I have written.

As I took this small step in writing articles, I was motivated to try other new writing projects. I recently self-published a children’s book based off a story I used to tell my boys when they were young. It cost me a lot of money and I have no idea if the book will do well or not, but I decided to try something new and take a risk. If you are interested, you can take a look at it here.

So this is my call out to you. Be encouraged and take a risk and try something new. Failure is just an opportunity to learn. You might find something new that you enjoy. In my opinion it is worth the risk, so give it a shot.

How about you? What is something new you have been thinking about doing? Are there some small risks you could take, that might lead to something new that you enjoy?

Ben Kubicek from SQLServerCentral.com

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

ADVERTISEMENT
SITC

SQL in the City Summits - New York, London & Chicago

This October, Redgate are inviting those interested in learning how their business can benefit from implementing Compliant Database DevOps to attend one of our SQL in the City Summits. If you manage SQL Server databases, or manage a team of people who do so,  Redgate’s SQL in the City Summit is the conference for you. Find out who’s presenting and register for a Summit near you today.
Register now

SQL Change Automation

CI/CD  for your SQL Server database

Feeling the pain of managing and deploying database changes manually? Redgate SQL Change Automation completes your database delivery process by building, testing, and deploying the database changes you and your team check into version control.  
Try it free

Featured Contents

 

Displaying Hierarchical Data

Adam Aspin from SQLServerCentral.com

Producing hierarchies from SQL tables can necessitate joining a table to itself. This article will explain how you can do this. More »


 

Introduction to PowerShell with SQL Server Using Invoke-SQLCMD

Additional Articles from SimpleTalk

PowerShell is the preferred scripting tool used by Windows and Active Directory administrators. It can also be used to administer SQL Server or even just export data. In this article, Greg Moore demonstrates how to use the PowerShell cmdlet Invoke-SQLCMD to export data from SQL Server. More »


 

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


 

From the SQLServerCentral Blogs - 6 Techniques For Troubleshooting Your Code

Bert Wagner from SQLServerCentral Blogs

This post is a response to this month’s T-SQL Tuesday #105 prompt by Wayne Sheffield.  T-SQL Tuesday is a way... More »


 

From the SQLServerCentral Blogs - Async Network IO SQL Wait

Justin Figg from SQLServerCentral Blogs

Over the last few days we have been tracking down the cause of some really high async network IO waits. ... More »

Question of the Day

Today's Question (by Steve Jones):

I decide to add a computed column to one of my tables. I use this code:

 ALTER TABLE dbo.SalesOrderHeader ADD PONumber AS 'PO' + OrderKey 

I want to index this column. What happens when I run this code?

 CREATE INDEX SalesOrderHeaderIX_DPONumber ON dbo.SalesOrderHeader (PONumber)

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: Indexing.

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

Expert Scripting and Automation for SQL Server DBAs

Automate your workload and manage more databases and instances with greater ease and efficiency by combining metadata-driven automation with powerful tools like PowerShell and SQL Server Agent. Automate your new instance-builds and use monitoring to drive ongoing automation, with the help of an inventory database and a management data warehouse. Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

I have a data frame with the passing leaders for the last three seasons of the NFL. The data looks like this:

 > passers Season Player Team Yards 1 2016 Drew Brees NOR 5208 2 2016 Matt Ryan ATL 4944 3 2016 Kirk Cousins WAS 4917 4 2016 Aaron Rodgers GNB 4428 5 2016 Philip Rivers SDG 4386 6 2016 Matthew Stafford DET 4327 7 2016 Joe Flacco BAL 4317 8 2016 Andrew Luck IND 4240 9 2016 Carson Palmer ARI 4233 10 2016 Russell Wilson SEA 4219 

I want to plot a histogram of the number of times that a player as thrown for certain values of yards. Meaning I want a count of a frequency on one axis with the number of yards on the other.

I decide to use the hist() function, but what do I pass in?

Answer: hist(passers$Yards)

Explanation:

If I call hist(), I need to pass in a column of the data frame that is being used for the breakdown on one axis. The other one will be the frequency by default. This will give me this plot:

Ref: hist() - 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 2017 : SQL Server 2017 - Development

Error when loading CSV file to SQL Server using SSIS. The Column Delimiter was not found - Can someone help me with loading the attached csv file database. The issue here is the CSV file has data with...

Need to modify the Update statement to include combination two new fields instead of one field.i want to write in better way in performance wise. - Need to modify the Update statement to include combination two new fields instead of one field: Current table cp_inv structure:  ID, cst1,...

Convert Varchar field - I have a Varchar field with units in inches :( that i need to convert to an integer (Unfortunately the " and...


SQL Server 2016 : SQL Server 2016 - Administration

Store values in one place and access them via various stored procedures - I am creating a number of stored procs for a particular category of things. These store procs will all have...

Clean up a Large Database - I'm looking into cleaning up a Large DB where ID and Timestamp are the fields in question and relevance. Its...

Easiest way to show client query results - I'm trying to figure out how I can basically print my query results and give them to the user before...


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

Exporting table to text file using BCP and XP_CMDSHELL with TAB column delimiter, not comma delimiter. - This T-SQL works perfectly (and i AM aware of security implications of enabling xp_cmdshell, not an issue here...) DECLARE @table_name VARCHAR(50) ='AgentMaster' DECLARE...

Get list of possible number of guests for a hotel - Hi guys,     let me try to explain the problem. There is a hotel with rooms for 2, 3 and 4...

optimization of stored procedure - Below stored procedure taking more time to complete the process.This procedure contains left join with five view.View names are V_PROD_ALIAS_SYN, V_PROD_ALIAS_SITE,...

index scan where seek expected - On a SQL 2016 instance I have a large table with dozens of columns including: COLA INT COLB BIT and nonclustered index: (COLA...

Joins clarification - Let's say I have Table A and Table B. Table A can join onto Table B because both tables have a...


SQL Server 2014 : Administration - SQL Server 2014

Mirroring - Working on setting up SQL Server mirroring. Following are the steps I am thinking to do.. Take Full Backup and Transaction...


SQL Server 2014 : Development - SQL Server 2014

I need some help with Text data type in SQL Server table. - I am trying to insert into table the approximately 74 thousand characters but Text datatype allows me to insert only...


SQL Server 2012 : SQL Server 2012 - T-SQL

Code to list dates end of month dates between specific start and end date ranges - Hello, Looking to list out end of month dates between a start and an end point in specific data set.   For instance,  Id ...


SQL Server 2008 : SQL Server 2008 - General

Does SQL compression process takes additional temporary disk space?, 1.2 TB database to compress - Compressing 1.2 TB database. Do I need temporary disk space for compression?. My largest table is 132 GB and for compressing,...

change column values to row - I want to change the values in the column to row based on their ID number. What I want to do...


SQL Server 2008 : T-SQL (SS2K8)

Compute & Rollup - This statement will produce:  Select EmpID, Yr, sum(Sales)as Sales from Sales Group by EmpId, Yr With Rollup  EmpID               Yr                            Sales


Data Warehousing : Integration Services

Read flat file but ignore everything in filename after character plus insert date into SQL Server table - I am fairly new to SSIS but not to SQL Server. Here are the conditions of the flat files: 1)...


Data Warehousing : Strategies and Ideas

Healthcare Data Warehouse - Starting new - small scale - Are there any members here in Healthcare? I work a lot with files that we get monthly from insurance companies...


SQLServerCentral.com : Articles Requested

SQL Server 2016 SSIS Basics - We have the Stairway to SSIS, but things have changed. I had a request for installing SSDT and a basic...

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 ©2018 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com