|
-
Nov 11th, 2004, 03:43 PM
#1
Thread Starter
Fanatic Member
csv into sql table
I recently wrote an app that takes a tab delimted file in notepad, split the delimeter, and import it into a column in sql. Just one column.
Now I have to do the same thing, only Its a excel sheet (csv) and it has about 17 column headers. I want to do the same thing, but I'm having trouble figuring out how to tell it which column in excel belongs to which column in sql. I've created a sql table with the exact column headers as the excel sheet, and want it to insert accordingly.
I can post the code I used to get the single column data in from my last project. Any help would be great!
Thank you and I hope this isnt' too confusing.
-
Nov 11th, 2004, 04:53 PM
#2
Is this MS SQL SERVER?
If so, have you looked into the BULK INSERT command or the BCP command line utility?
-
Nov 11th, 2004, 06:18 PM
#3
Thread Starter
Fanatic Member
Yes it is MS Sql server 2000.
I don't think I've heard of the bulk insert command.
-
Nov 11th, 2004, 11:14 PM
#4
You could also create a DTS import package. You can easily transform
your data and map fields too. Look in Enterprise Manager to
create a package.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|