Articles tagged SQL Prompt

18 December 2017
18 December 2017

SQL Server Machine Learning Services – Part 2: Python Data Frames

0
10
SQL Server Machine Learning Services provides the ability to run Python scripts directly against data in SQL Server. To do so, you must understand how to work with the data frame object. Robert Sheldon explains how to get started using the data frame object, how to pass data from SQL Server to it, and how to manipulate it with Python and pandas commands. … Read more
17 November 2017
17 November 2017

Still More SQL Server Features that Time Forgot

As the final entry in this series, Robert Sheldon leads you through a group of forgotten features that have been removed from recent versions of SQL Server. In some cases, the features were widely used and often loved, while others had lost their usefulness over the years or were replaced with something much better. In this article, he remembers Data Transformation Services (DTS), a handful of DBCC commands, a few utilities, Active Directory Helper Service, English Query, Web Assistant, SQL Mail, Native XML Web Services, Notification Services, SQL Distributed Management Objects, Surface Area Configuration Tool, and the Pubs and Northwind databases.… Read more
14 November 2017
14 November 2017

Summarizing Data Using the GROUPING SETS Operator

Writing aggregate queries is one of the most important tasks for anyone working with T-SQL. Determining the expressions required in the GROUP BY clause is not that difficult, but what do you do if you need to include different combinations of group by expressions in the same result set? Alfonso demonstrates how to use the GROUPING SETS operator to accomplish this task.… Read more
03 November 2017
03 November 2017

SQL Server R Services: Working with Multiple Data Sets

0
7
Although it is easy to use SQL Server R Services to create R scripts that incorporate SQL Server data by passing in a T-SQL query as an argument when calling the sp_execute_external_script stored procedure, you are limited to that one query, unless you pass additional data directly between R and SQL Server via CSV files. It is simple to do, and opens up many additional opportunities for data analysis. Robert Sheldon explains how.… Read more
27 October 2017
27 October 2017

Importing JSON Data from Web Services and Applications into SQL Server

To support many applications, it makes sense for the database to work with JSON data, because it is the built-in way for a JavaScript or TypeScript application to represent object data. It can mean less network traffic, looser coupling, and less need for the application developer to require full access to the base tables of the database. However, it means that the database must do plenty of checks first before importing. Phil Factor explains how it can be easily done.… Read more
18 October 2017
18 October 2017

Even More SQL Server Features that Time Forgot

SQL Server works well, and Microsoft does everything it can to keep it relevant and competitive: As with everything in real life, it doesn't don't always get it completely right, and Rob Sheldon continues his quest through the jungle of past features to rediscover and explore the ones that time forgot. Here, he comes across Lightweight Pooling, XML Indexes, Stretch Databases, SQL Variants, Transaction Savepoints and In-Memory OLTP.… Read more
12 September 2017
12 September 2017

Consuming hierarchical JSON documents in SQL Server using OpenJSON

Over the years, Phil was struck by the problems of reading and writing JSON documents with SQL Server, and wrote several articles on ways of overcoming these problems. Now that SQL Server 2016 onwards has good JSON support, he thought that the articles would be forgotten. Not so, they continue to be popular, so he felt obliged to write about how you can use SQL Server's JSON support to speed the process up.… Read more
08 September 2017
08 September 2017

Missing Data

In the real world of business or scientific reporting and analysis, data can prove to be awkward. It can be plain wrong or it can be altogether missing. Sure, we have the NULL to signify unknown, but that doesn't play well with regular business reporting. There are a number of ways of dealing with missing information, and methods of estimating data from existing data has a long and respectable history. Joe Celko gets to grips with a data topic that is often treated with some trepidation. … Read more
06 September 2017
06 September 2017

SQL Server R Services: Working with Data Frames

0
9
Although you can get started with R in SQL Server without understanding data frames, they are a key structure of the R language that are the equivalent of SQL Server table variables. They give you many ways of manipulating and analyzing data and passing it between R and SQL Server. For a database professional, they provide a clear and familiar concept when getting to grips with integrating R into the database.… Read more
24 August 2017
24 August 2017

When is the Data Deleted?

Imagine that your business is providing a service to individuals, and you charge by the amount of usage. You are trading your service internationally and need to keep a record of who among your customers does what. You then produce invoices and keep accounts. Your customers pay via a third-party service. So far so good. … Read more
23 August 2017
23 August 2017

The SQL Server Features that Time Forgot

Every new release of SQL Server comes with new features that cause a ripple of excitement within the industry: well, amongst the marketing people anyway. What happens to all the exciting TLAs that are bandied about when a new version launches? It's mixed, it seems. Adam Machanic's classic post, The SQL Hall of Shame, has inspired Rob Sheldon to look back at some of the features that, though worthy, have may have failed to hit the mainstream.… Read more
11 August 2017
11 August 2017

Simple SQL: Random Thoughts

How does one get a truly random sample of data of a certain size from a SQL Server database table. Well, there are simple non-portable tricks one can use, such as the NewID() function, but then refining those can be tricky. Take the Rand() function for a start. Can it really provide you with a truly random number? Why doesn't the TABLESAMPLE clause give you a set number of rows? Joe Celko scratches his head a bit, explains some of the issues and invites some suggestions and tricks from readers.… Read more
04 August 2017
04 August 2017

The Power of Python and SQL Server 2017

Python is new to SQL Server 2017. It is intended primarily to allow the use of Python-based machine-learning within SQL Server, but it can be used for far more than this, with any Python libraries or Frameworks. To provide an example of what is possible, Hitendra shows how to use the feature securely to provide intelligent application caching, where SQL Server can automatically indicate when data changes to trigger a cache refresh. … Read more