Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql server import json

DECLARE @JSON VARCHAR(MAX)

SELECT @JSON = BulkColumn
FROM OPENROWSET 
(BULK 'C:file-locationmy-data.json', SINGLE_CLOB) 
AS j
Comment

sql server import json

SELECT *
FROM OPENJSON (@JSON, '$.data.assets.parcels') 
WITH (id VARCHAR(7), 
		x INT,
		y INT,
		price INT '$.auction_price') -- new column name
)
Comment

sql server import json

SELECT ISJSON(@JSON) 
Comment

sql server import json

If (ISJSON(@JSON)=1)
SELECT @JSON AS 'JSON Text'
Comment

PREVIOUS NEXT
Code Example
Sql :: MySQL Min And As 
Sql :: implicit inner join table alias with id values 
Sql :: online t-sql editor 
Sql :: PL-SQL: mm-dd for subqueries and different columns 
Sql :: drop column from table if exist on live server mysql 
Sql :: import sheets doc into databricks 
Sql :: SQL DROP TABLES EVENT 
Sql :: MySQL Quartiles in SQL query 
Sql :: rails sql query converstion 
Sql :: FILENAME /usr/bin/mysql does not exists. Make sure correct path is set in /etc/dump admin/settings.conf. 
Sql :: extract sql from query object sqlalchemy 
Sql :: Update Query in SQL Server Table - NAYCode.com 
Sql :: openquery update linked server 
Sql :: call object contructor and call methods of object 
Sql :: Extend the 2.1 case study to implement below listed queries. Write separate operations/method to implement each query. a.Query all books in database. 
Sql :: add mysql database to power bi web 
Sql :: how to install firebird 
Sql :: composite primary key sql 
Sql :: t-sql conditional order by multiple columns 
Sql :: how to get data from 2 database 
Sql :: upload multipe databases mysql 
Sql :: select all fields from table 
Sql :: sqlites studio red exclamation mark when poening databse 
Sql :: python mysql github 
Sql :: psql check table fields 
Sql :: how to write query to to display record having maximum value 
Sql :: check the size of the tables here ordered from the biggest size 
Sql :: employee name starting with in sql 
Sql :: apache2 ssl error 
Sql :: mysql on delete set null 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =