background preloader

SQL Server

Facebook Twitter

File stream

[SQL Denali] 查詢效能的提升 Use Columnstore Index. Scalable Data Science with Hadoop Spark and R v1.2. Get started with ScaleR on Apache Spark. Overview This article introduces the ScaleR functions in a RevoScaleR package with Apache Spark (Spark) running on a Hadoop cluster.

Get started with ScaleR on Apache Spark

ScaleR functions offer scalable and extremely high performance data management, analysis, and visualization. Hadoop provides a distributed file system and a MapReduce framework for distributed computation. Spark is an open source big data processing framework. This guide focuses on using ScaleR’s big data capabilities in a Hadoop environment with Spark. While this article is not a Hadoop or Spark tutorial, you can complete the tasks with no prior experience necessary. For other tutorials and examples, see Get started with ScaleR. Advanced JSON Techniques in SQL Server 2016 - Part 3. By: Aaron Bertrand | Read Comments | Related Tips: More > SQL Server 2016 Problem In previous tips, Advanced JSON Techniques in SQL Server 2016 (Part 1 and Part 2), I gave examples of several JSON functions in SQL Server 2016, as well as how to create an index for efficient searching of text within a JSON document.

Advanced JSON Techniques in SQL Server 2016 - Part 3

In this tip, I want to show you a new keyword and a new function, both of which help to control JSON output. Solution WITHOUT _ARRAY_WRAPPER in JSON. Support, Functionality, and Limitations of JSON in SQL Server 2016. As JSON continues to increase in popularity, support from third-party products is burgeoning as well.

Support, Functionality, and Limitations of JSON in SQL Server 2016

According to the Microsoft team, JSON support was one of the most requested features on Microsoft connect prior to its official announcement. While some JSON functionality is available in SQL Server 2016, significant limitations may hamper development and storage efforts. The Basics of JSON JSON is a language-independent format to store objects in attribute-value pairs. Advanced JSON Techniques in SQL Server 2016 - Part 3.

OneDrive.

Sql Server 2016 R Service

SQLFUNCTION. SQL Pivot with String. Different Types of SQL Server Functions. Posted By : Shailendra Chauhan, 19 Apr 2012 Updated On : 07 Apr 2014 Total Views : 200,950 Support : SQL Server 2005,2008,2012 Keywords : Types of Sql Server Function pdf,System Function,User Defined Function, Scalar Function.

Different Types of SQL Server Functions

Tip of the Day. The SUBSTRING string function returns part of a character, binary, text or image expression.

Tip of the Day

The syntax of the SUBSTRING string function is as follows: SUBSTRING( <expression>, <start_position>, <length> ) The <expression> parameter is a character string, binary string, text, image, a column or an expression that includes a column. The <start_position> parameter is an integer that specifies where the substring starts and can be of BIGINT data type. The <length> parameter is a positive integer that specifies how many characters or bytes of the <expression> will be returned. Here are a few uses of the SUBSTRING string function: Usage #1 : Get the First Name and Last Name from a Full Name DECLARE @FullName VARCHAR(50) = 'Mark Zuckerberg' SELECT SUBSTRING(@FullName, 1, CHARINDEX(' ', @FullName) - 1) AS [First Name], SUBSTRING(@FullName, CHARINDEX(' ', @FullName) + 1, LEN(@FullName)) AS [Last Name]

SQL Split @ 學海無邊,書囊無底. 如何將逗號分隔的字串透過T-SQL回傳成一組DataSet呢。

SQL Split @ 學海無邊,書囊無底

例如輸入 Sandy,Marry,Dofi 一組字串時,回傳下列三筆資料 。 Sandy Marry Dofi CREATE FUNCTION dbo.ufn_SplitToTable ( @InputString nvarchar(4000) ) RETURNS @tblReturn TABLE (COL1 nvarchar(60)) AS BEGIN DECLARE @CIndex smallint WHILE (@InputString<>'') BEGIN SET @CIndex=CHARINDEX(',',@InputString) IF @CIndex=0 SET @CIndex=LEN(@InputString)+1 --透過substring函數取得第一個字串,並輸入資料表變數中 INSERT INTO @tblReturn (COL1) VALUES (SUBSTRING(@InputString,1,@CIndex-1)) IF @CIndex=LEN(@InputString)+1 BREAK SET @InputString=SUBSTRING(@InputString,@CIndex+1,LEN(@InputString)-@CIndex) END RETURN END GO 最後使用下列語法測試下Select * From dbo.ufn_SplitToTable('Sandy,Lisa,Dofi')執行結果如下: 以我的設計經驗來說,我通常都會將這個自訂函數拿來模擬多重選單的功能。

Create proc sp_QueryCustomers @STR nvarchar(max) AS SELECT CustomerID,CompanyName,ContactName,Phone FROM dbo.Customers WHERE CustomerID IN (select * from dbo.ufn_SplitToTable(@STR)) GO --使用下列語法執行 DECLARE @STR NVARCHAR(MAX) SET @STR='ALFKI,ANATR' EXEC sp_QueryCustomers @STR. Exporting Query Results to CSV using SQLCMD. SQL Server 2016 新功能搶先看 - Temporal Tables - TechNet Taiwan 官方部落格.

設定SQL Server「錯誤記錄檔(Error log file)」的保存份數. Format Nested JSON Output with PATH Mode (SQL Server) Topic Status: Some information in this topic is preview and subject to change in future releases.

Format Nested JSON Output with PATH Mode (SQL Server)

Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2). To maintain full control over the format of the JSON output, specify the PATH option with the FOR JSON clause. PATH mode lets you create wrapper objects and nest complex properties. Here is the syntax of the FOR JSON clause with the PATH option. Here are some examples of the FOR JSON clause with the PATH option. Queries that don't select rows from a table A query that uses the FOR JSON PATH option does not have to have a FROM clause. Use dot-separated column names to nest properties. Queries that select rows from a table When you select rows from a table, the results are formatted as an array of JSON objects.

Use JSON output in SQL Server and in client apps (SQL Server) The following examples demonstrate some of the ways to use the FOR JSON clause or its output in SQL Server or in client apps.

Use JSON output in SQL Server and in client apps (SQL Server)

The output of the FOR JSON clause is of type NVARCHAR(MAX), so it can be assigned to any variable, as shown in the following example. DECLARE @x NVARCHAR(MAX) = (SELECT TOP 10 * FROM Sales.SalesOrderHeader FOR JSON AUTO) You can create user-defined functions that format result sets as JSON and return this JSON output. The following example creates a user-defined function that fetches some sales order detail rows and formats them as a JSON array. CREATE FUNCTION GetSalesOrderDetails(@salesOrderId int) RETURNS NVARCHAR(MAX) AS BEGIN RETURN (SELECT UnitPrice, OrderQty FROM Sales.SalesOrderDetail WHERE SalesOrderID = @salesOrderId FOR JSON AUTO) END. Format Query Results as JSON with FOR JSON (SQL Server) Topic Status: Some information in this topic is preview and subject to change in future releases.

Format Query Results as JSON with FOR JSON (SQL Server)

SQL Server 2016 : JSON Support - SQL Sentry Team Blog. I was at MS Ignite last week, and attended the Foundational Keynote, entitled "The SQL Server Evolution.

SQL Server 2016 : JSON Support - SQL Sentry Team Blog

" In that session they announced a new feature that will be available in the next version of SQL Server (and that you will get to play with in some capacity when CTP2 is released later this year): JSON. Yes, you read that right: JSON. I can't get into too many technical details just yet, and I'm not even sure how much functionality will actually be available in the forthcoming CTP, but I can share a little bit from what I've been able to play with so far. And I want to do that because, even though I don't have a direct need for JSON support myself, I've heard that as an argument against SQL Server a number of times (though it is often difficult to gauge how serious people are when they say that). First of all, this is going to be standard functionality available in all editions, even Express.

Making Data Analytics Simpler: SQL Server and R. R and SQL Server are a match made in heaven. You don't need anything special to get started beyond the basic instructions. Once you have jumped the hurdle of reliably and quickly transferring data between R and SQL Server you are ready to discover the power of a relational database when when combined with statistical computing and graphics.

In this article I will describe a way to couple SQL Server together with R, and show how we can get a good set of data mining possibilities out of this fusion. First I will introduce R as a statistical / analytical language, then I will show how to get data from and to SQL Server, and lastly I will give a simple example of a data analysis with R. What is R and what noticeable features does it have R is an open source software environment which is used for statistical data analysis.

R does not have a storage engine of its own other than the file system, however it uses libraries of drivers to get data from, and send data to, different databases. ? 將sql server database上傳到Azure SQL Database 的限制. Updated: January 20, 2015 This topic describes the Microsoft Azure SQL Database general guidelines and limitations.

The general guidelines and limitations details are covered in the following headings: SQL Server 2014 強化備份 / 還原功能,輕鬆與 Microsoft Azure Storage 無縫接軌. SQL Server 備份及還原與 Windows Azure Blob 儲存體服務. 本節內容: 安全性 安裝的必要條件 重要元件和概念簡介 Windows Azure Blob 儲存體服務. 如何利用 SQL Server 2014 將資料庫檔案存放於 Microsoft Azure Storage (上) VITO の SQL 學習筆記. ConnectionStrings.com - Forgot that connection string? Get it here! SQL Server Performance - SQL Server Performance Tuning. Sql server資料庫佈署到azure上的問題"Target string size is too small to represent the XML instance"

Azure如何匯入MDF檔案.