-2

I am looking to important around 100 csv files with the same data throughout all of them. I am using oracle SQL developer

9
  • Please add details of what you have tried and at what point you're encountering a problem. Commented Feb 6, 2020 at 16:13
  • Just to make sure: your database is MS SQL Server, and the tool you use is Oracle SQL Developer. It that correct? Commented Feb 6, 2020 at 16:13
  • I have tried to search up methods to do this and can't seem to find anything to do it in one bulk import. any tips? Commented Feb 6, 2020 at 16:14
  • stackoverflow.com/questions/6198863/oracle-import-csv-file Commented Feb 6, 2020 at 16:15
  • @Littlefoot Yes i believe so Commented Feb 6, 2020 at 16:15

1 Answer 1

2

Is this SQL Server or Oracle? Either way, if I were you, I would merge all 100 files into one single file, and load that into any database you are working with. Python will easily do the merge task for you. Then, load the consolidated file into your DB.

import pandas as pd
import csv
import glob
import os

#os.chdir("C:\\your_path\\")
results = pd.DataFrame([])
filelist = glob.glob("C:\\your_path\\test\\*.csv")
#dfList=[]
for filename in filelist:
    print(filename)  
    namedf = pd.read_csv(filename, skiprows=0, index_col=0)
    results = results.append(namedf)

results.to_csv('C:\\your_path\\CombinedFile.csv')
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.