SQLServerCentral - www.sqlservercentral.com

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

Featured Contents

Featured Script

The Voice of the DBA

Go Code

Should we be teaching more people to code? That's a question I ponder, especially after re-reading an old view against the idea, a newer one, and a pro-code piece. At the end of the day, I think that coding is a basic skill, similar to reading and writing because so many of us, perhaps most of us in the developed world, will need to work with computers.

I don't mean to imply that everyone should be able to write an MVC application or produce a graphical application. I also don't expect most people to understand calculus or produce a thesis. However, I do want a core competency that allows them to work effectively with a checkbook and communicate a point effectively. I want them to understand enough coding to appreciate the logical and methodical way in which computers process instructions. I'd like to have most people appreciate how to create, store,  shuffle, and retrieve a digital deck of cards.

Certainly I think that those people who continue to learn and advance in many industries can benefit from an understanding of what a database is, how to write a query that might logically fetch information. Even if you use a tool such as Excel, Power BI, Tableau, etc., knowing the ways in which we store information and need to process it can help you better work with the computing machines in your life.

Perhaps seeing how easy it can be to produce bugs will help people also appreciate the need for better security. I'd hope this would also have them demanding that professional software developers produce better work. Quality matters, and while I might be able to build a car, I would expect that one produced by professionals would be of a much higher quality, and much more reliable than my own efforts.

Having a basic understanding of how computers think will not only help us understand our systems better (or the people that design them), but can also help us develop thoughts and views on how we should reconcile the digital with analog world. I strongly feel that our understanding of, and the expectations we have in the analog world are very much inadequate for assessing a digital world that can accomplish things many people would have viewed as magic a few years ago. Certainly our legal structures aren't well equipped to work in a digital era. To help us move forward, I'd like more people to understand computing.

Steve Jones from SQLServerCentral.com

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


The Voice of the DBA Podcast

Listen to the MP3 Audio ( 3.3MB) podcast or subscribe to the feed at iTunes and Libsyn. feed

The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music.

ADVERTISEMENT

HOW TO FIX
SQL SERVER
DISK I/O

(without a hammer)

Featured Contents

 

Data Lifecycle Management using SQL Server

Joao Osorio from SQLServerCentral.com

With the data proliferation issues, a well-defined lifecycle for data retention is a growing demand. More »


 

Free Webinar - Redgate DLM Demo

Learn how to use Redgate’s DLM solution to improve your database change management process in our free webinar on November 15th. Microsoft Data Platform MVPs, Steve Jones, and Grant Fritchey, will demonstrate how Redgate’s tools plug into Subversion, TeamCity & Octopus Deploy so that you can build, test and deploy your database alongside your application code. Register now. More »


 

Azure SQL Database - Implementing Azure AD Authentication

Additional Articles from Database Journal

Marcin Policht focuses on the specifics of using Azure Active Directory to authenticate to Azure SQL Database. More »


 

From the SQLServerCentral Blogs - Live 360–SQL in Orlando

Steve Jones from SQLServerCentral Blogs

I’ll be at the last big SQL Server conference in the US for 2016 this December. VS Live is a... More »


 

From the SQLServerCentral Blogs - Reinforcing the Importance of Statistics on Row Estimate

Grant Fritchey from SQLServerCentral Blogs

I recently wrote an introductory post about the importance of statistics. I just received a reinforcement on how important they... More »

Question of the Day

Today's Question (by Steve Jones):

I run the PowerShell command shell and import the SQL Server module. I don't have a default instance, but I do have these two named instances:

  • .\SQL2016
  • .\SQL2014

How do I change my default location in the shell to browse the 2014 instance? (Assume the name of my computer is [Plato])

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

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

Professional Microsoft SQL Server 2014 Integration Services

Master the fundamentals of Transact-SQL—and develop your own code for querying and modifying data in Microsoft SQL Server 2016. Led by a SQL Server expert, you’ll learn the concepts behind T-SQL querying and programming, and then apply your knowledge with exercises in each chapter. Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

I want to export the results of this query in my database:

 SELECT * FROM dbo.Customers WHERE Active = 1 

I decide to use sqlcmd to query the database and export the results to the file, customers.txt. What command should I use to export data and immediately exit sqlcmd?

Answer: sqlcmd -S .\SQL2016 -Q "select top 10 * from Customers where active = 1" -d Sandbox -o customers.txt

Explanation:

The answer is: 

sqlcmd -S .\SQL2016 -Q "select top 10 * from Customers where active = 1" -d Sandbox -o customers.txt

This uses -Q, which will immediately exist sqlcmd. The -q parameter leaves SQLCMD running. The -o parameter is needed to export results to a file.

Ref: SQLCMD - https://msdn.microsoft.com/en-us/library/ms162773.aspx


» Discuss this question and answer on the forums

Featured Script

Automatic restore database to different server from backup file

David Zhou from SQLServerCentral.com

EXEC  [dbo].[sp_1RestoreFullandtran]   @restoreFromDir = N'c:\work\data',--folder for store backup file
  @onlyFUllbakup = N'N',
  @ServerName = N'ServerA',--for server which backup file come from, it is for step 3 and 4 to know
  @moveto = N'Y',--move to differential path on new server or N same path on new server
  @restoreToDataDir = N'c:\work\database\data',--if move to if Y, must be new database data file location
  @restoreToLogDir = N'c:\work\database\log'

More »

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

estimate the t-log grow - I would like to know the t-log grow as the databases are in simple recovery , how can we calculate the...


SQL Server 2014 : Administration - SQL Server 2014

Query returning incorrect results randomly - Hi Team, I'm running a simple SQL query which returns a set of columns based on a search criteria. It has...

Table valued fucntion or scalar valued function - I have a productCase table that we created cases for some products. Then there are some other tables related with...

Cluster Node Down - Hi Experts, One of our node in a 2 node SQL cluster is down . Checked the Port 3343 is open , no...

MSDB jobs in DB mirroring and AlwaysOn availability group - Hi all, As we have already know -> system databases are not mirrored nor replicated in both mirroring and alwayson availability...


SQL Server 2014 : Development - SQL Server 2014

check if record exists then update else insert - i have to check if record exists in table , if there is record then update else insert. Stg_table Id seq name company 1...

How to use a CSV as parameter in a query - I always used a query with an(one) integer parameter, but now it has to change to more integers in the...

SUM and Group using IN clause - Hi, I am looking for a way to create a query to SUM and Group BY by using IN clause...

Completing Fixed Sets With Another Table - Hi, I'm having some trouble finding a solution to a problem, its been a few hours now and I think I...


SQL Server 2012 : SQL 2012 - General

is it possible to determine the max length of a field in a csv file? - This has been discussed before but I couldn't find a case/answer that might apply to my situation: From time to time...

Current options for data-change notification on a vendor-schema (unalterable) - I've got more and more applications popping up in my enterprise environment that would benefit from being notified when information...


SQL Server 2008 : SQL Server 2008 - General

2008r2 vs 2014 (and 2012) - Ignoring 'tab/illegal' characters - Hello everyone, I hope you can help, I have a simple query, where I am copy/pasting grid results to Excel via...

Give database to customers, how would you want to receive it? - Hi All, I apologise in advance if this has already been covered but searching for deploying, distributing or packaging a database...


SQL Server 2008 : T-SQL (SS2K8)

Username increment by 1 if already exists in table - Hi All, I am having user table as below Create table #TEMP_USER ( ID int identity (1,1) , USERNAME nvarchar(50) ); I want to insert...

Strange result using SUM with ISNULL(NULLIF... - Hi, I'm very grateful for any light that can be shed on this. My code was per the following: SUM( ISNULL( NULLIF(VAL1,0),...


SQL Server 2008 : SQL Server 2008 Administration

Using a local installation of SQL Studio to connect to a remote database server - Hello -- One of my colleagues wanted to know if there is a major advantage to utilizing a local installation of...


Reporting Services : Reporting Services

Reporting Services From a Data warehouse - Bottleneck On Every Month - Hi All, I am a Software Engineer working in an MNC on MSBI Platform. I have been working in Reporting services project...


Data Warehousing : Integration Services

Need to implement left join using look up - I have a stage table S and new columns from other table T , i want to do left join on...


Data Warehousing : Strategies and Ideas

Multiple Joins on Fact Table - Hi, I am building a DW which will load data from 2 separate sources. Each source will populate the Broker Dim table...


SQL Server 2005 : SQL Server Newbies

Random 64 Characters alphanumeric String - I need to create a random 64 alphanumeric string every time a new row is added to a SQL 2005...

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