Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
sahil
Explorer
0 Kudos
Hi fellow developers!

Recently I got the requirement where i need to upload multiple records at one go as a mass upload because the process a created is async and even after using await its waiting for the input but call to that function is still async and that cause uploading of records with different thread uploading data in HANA at a same time. which cause our data stored inconsistence. Therefore, I look into the way to upload multiple records as same time I find few things on internet, but none work for HANA. although they work for other databases. Following are the syntax we can use to upload multiple records in HANA.

SYNTAX:

INSERT INTO SCHEMA_NAME.TABLENAME
SELECT VALUE1, VALUE2, VALUE3................. from dummy union

.

.

.
SELECT VALUE1, VALUE2, VALUE3................. from dummy;

we need to dummy as we do not have table initially for making it union. Hence, we use dummy.

 

CONCLUSION:

Anyone who like to use asynchronous function for uploading data to HANA database and want it to be in sequence can use mass upload query where we upload bunch of insert records in a one go.

Hope that help.

Thank you.

Please provide your valuable feedback on the topic if there is any other way, we can upload multiple records in one go, we can discuss it in comment section. You can also follow me for more such content and add comments if you find it helpful.

For more insight you can follow the SAP HANA Cloud, SAP HANA database, post and answer questions (https://answers.sap.com/tags/ada66f4e-5d7f-4e6d-a599-6b9a78023d84), and read other posts on the topic (https://blogs.sap.com/tags/ada66f4e-5d7f-4e6d-a599-6b9a78023d84/)
Labels in this area