I am trying to put in a lot of data into the SQL database, and some of them are in a table form. So, I json-encoded the table so it can be inserted into the SQL database (as a string).
Example : [“abc”, “123”, “hello”]
But my problem is that, each JSON encoded string has double quotes (") all over. I thought of using ‘string.gsub’ to replace the double quotes, but I believe there some be some better method than this.
You use [[and]] just like you would use " and " or ’ and '. One starts a string, the other ends it. But the benefit of using [[and]] is that it can span multiple lines. It’s benefit for this is that if your strings you’re inserting into your database have apostrophes, then your current method of using single quotes won’t break:
You use [[and]] just like you would use " and " or ’ and '. One starts a string, the other ends it. But the benefit of using [[and]] is that it can span multiple lines. It’s benefit for this is that if your strings you’re inserting into your database have apostrophes, then your current method of using single quotes won’t break:
I have seen this thread and I have proper solution toLoad JSON String into SQL Server. To do so You have to follow some steps. Here I will mention step by step process to do and follow this step in same way.
Download and Install SSIS JSON Source Connector.
From your tool box Drag SSIS JSON Source
Specify JSON File or URL from where you want to consume JSON data
Click on Columns tab and select columns you want to select
Drag OLEDB Destination. Select SQL Server connection and Target Table where you want to load data
Map Input columns to Target SQL Server Table
Run the package.
To see sample work or snapshot of work and other related task go through this link.
I have seen this thread and I have proper solution toLoad JSON String into SQL Server. To do so You have to follow some steps. Here I will mention step by step process to do and follow this step in same way.
Download and Install SSIS JSON Source Connector.
From your tool box Drag SSIS JSON Source
Specify JSON File or URL from where you want to consume JSON data
Click on Columns tab and select columns you want to select
Drag OLEDB Destination. Select SQL Server connection and Target Table where you want to load data
Map Input columns to Target SQL Server Table
Run the package.
To see sample work or snapshot of work and other related task go through this link.