Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi Team,
I want to insert entire data from csv to Table using Bulk Insert, so that entire data from CSV goes to Table
by connecting one time to database , please suggest is there any option in PTC Thingworx
Regards,
Datta
Solved! Go to Solution.
Are you trying to store this in a ThingWorx storage entity (Stream or Datatable) or are you trying to insert these directly into a database via a SQL command?
If you're storing into a Stream or DataTable, you can use the AddStreamEntries or AddDataTableEntries service to insert in one operation. If you're attempting to add into a database table, you can programmatically create your sql insert statement like:
INSERT INTO myTable (uid, label, value) VALUES
(1, 'label1', 'value1'),
(2, 'label2', 'value2'),
(3, 'label3', 'value3'),
.
.
.
Either way, you can use the CSV parser tools to first parse the CSV file into an infotable and then use one of the options above.
Hope that helps!
--Nick
Are you trying to store this in a ThingWorx storage entity (Stream or Datatable) or are you trying to insert these directly into a database via a SQL command?
If you're storing into a Stream or DataTable, you can use the AddStreamEntries or AddDataTableEntries service to insert in one operation. If you're attempting to add into a database table, you can programmatically create your sql insert statement like:
INSERT INTO myTable (uid, label, value) VALUES
(1, 'label1', 'value1'),
(2, 'label2', 'value2'),
(3, 'label3', 'value3'),
.
.
.
Either way, you can use the CSV parser tools to first parse the CSV file into an infotable and then use one of the options above.
Hope that helps!
--Nick
Hi @DK_9985660
If you found the previous response helpful, please mark it as the Accepted Solution for the benefit of others with the same question.
Regards.
--Sharon