Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new to sql and I have multiple text files which i have to import into a sql table as individual columns.
Say I have text files named file1 ,file2 ,file2. I need to import these 3 files into a table named TEST as columns named file1 ,file2 ,file2.
I am using sql server 2017.

What I have tried:

I'm able to import the files as different tables using import wizard.
Posted
Updated 21-Feb-18 0:06am
Comments
Maciej Los 21-Feb-18 4:58am    
We can't read in your mind and we don't have an access to your data. Please, be more specific and provide more details.
Suvendu Shekhar Giri 21-Feb-18 4:59am    
How about writing a few lines of code and that code to do your job?

 
Share this answer
 
If the text files are large, you could try Bulk Insert, see example here:
Bulk Insert a .NET List to Database[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900