From the course: SQL Server Machine Learning Services: R

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Output data to a result set

Output data to a result set

From the course: SQL Server Machine Learning Services: R

Start my 1-month free trial

Output data to a result set

- [Instructor] Printing information to the sequels of our messages window is an easy way to quickly get insight into your data. But it isn't very useful to SQL Server. The information just isn't structured, or organized, and your applications simply can't use the data in that format. What we need to do instead, is export the data as a SQL Server result set. Right now I have the standard R Script template on the screen, and I've filled in the input data one parameter with the same query that we looked at in the last movie. If you highlight just this portion of the script, and then make sure that you're targeting the Wide World Importers database, you can execute it just like any other query on your system. Here's the data that we'll be working with. You can see there's a total of 190 rows, across five different columns. Now, when you run a query in SQL Server, it returns what's called a ResultSet. This looks, and acts…

Contents