Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Loading json file into sql server
use TestDb go declare @cmd as nvarchar(max) declare @i int = 0; while @i < 3 begin set @cmd = 'insert into LogEntry SELECT le.* FROM OPENROWSET (BULK ''E:\json\data' + cast(@i as nvarchar) + '.json'', SINGLE_CLOB) as j CROSS APPLY OPENJSON(BulkColumn) WITH( Id int, [Data] nvarchar(MAX), Result nvarchar(MAX), Input nvarchar(MAX), Compiler_args nvarchar(2000), Lang int, Is_api int, [Time] datetime, Is_success int) AS le' Exec(@cmd) set @i = @i + 1 end
run
|
edit
|
history
|
help
0
SQLERROR
split a string into pairs of words
SQL
Exa
n sei o nome (30.10)
parameters_in_procedure-join&correlated sub-query content
test1
tableA
Primary key and unique key for single column and multi columns
Combined Where and having