cancel
Showing results for 
Search instead for 
Did you mean: 

Import data into SQL data table

Nannevan_der_Wa
Level 4

Hello,

Is there standard functionality to import excel or csv files into a SQL Datatable? I can see the SQL objects that can be used for execution of queries and extraction of tables into collections, but I do not seem to find any functionality towards actually importing data into SQL.

Is anyone familiar with this?

Best,
Nanne



------------------------------
Nanne van der Wal
Advisor
EY
Europe/Amsterdam
------------------------------
1 BEST ANSWER

Helpful Answers

VivekGoel
Level 10
There is no standard utility around direct inserts . However with little tweeking you can create it.

1- Check if table is created already?
2- if yes, go to next step, If no, then check if any key constraints are provided?, If yes, create the table with constraints (Create table query), and if no, then create a table without constraints.
 3- If table is created already , verify santiy of data and use string manipulation to create the insert queries for each row,
4- run the insert queries and commit.


------------------------------
Vivek Goel
RPA Architect
Asia/Singapore
https://www.rpatools.com/
"If you like this post, please press the "Recommend" Button.
------------------------------

View answer in original post

2 REPLIES 2

VivekGoel
Level 10
There is no standard utility around direct inserts . However with little tweeking you can create it.

1- Check if table is created already?
2- if yes, go to next step, If no, then check if any key constraints are provided?, If yes, create the table with constraints (Create table query), and if no, then create a table without constraints.
 3- If table is created already , verify santiy of data and use string manipulation to create the insert queries for each row,
4- run the insert queries and commit.


------------------------------
Vivek Goel
RPA Architect
Asia/Singapore
https://www.rpatools.com/
"If you like this post, please press the "Recommend" Button.
------------------------------

AyshaM
Level 3
Were you able to find an efficient method to achieve this?

------------------------------
Aysha M
------------------------------