Posts

Showing posts from October, 2023

Delete Table WHEre

Disable CONSTRAINT ALTER TABLE [TableName] NOCHECK CONSTRAINT ALL; Disable Index ALTER INDEX ALL ON [TableName] DISABLE; Rebuild Index ALTER INDEX ALL ON [TableName] REBUILD; Enable CONSTRAINT ALTER TABLE [TableName] CHECK CONSTRAINT ALL; Delete again

Import JSON data into SQL Server

Image
 Nguồn: Import JSON data into SQL Server (sqlshack.com) Import JSON data into SQL Server January 17, 2020  by  Rajendra Gupta This article explores the process of JSON data import in the SQL Server table using T-SQL and SSIS. Introduction Java Script Object Notation is an accessible data exchange format. Many applications support JSON format data nowadays. We can use JSON data for unstructured data such as log files and NoSQL databases. SQL Server also supports JSON format data import and export for exchanging data with different data sources and applications. We can use SQL Server FOR XML PATH or FOR XML Auto clause in the SQL Server query, and it retrieves the results into the JSON format. We have explored this in the article  How to import/export JSON data using SQL Server 2016. In the following image, we can see built-in functions for converting text into JSON and vice-versa: Azure Data Studio JSON format output We can also save results in JSON format without specifying any paramet