How to get data from Excel into a SQL table

xenon
Member Posts: 30
in SQL General
Hello everyone.
I have an Excel spreadsheet with a few thousand items in there with the weight - just two columns. What I want to do is for each "Item" in the spreadsheet column "A" get the weight from column "B" and populate the weight field in my Item table in SQL.
Can anyone show me a script by which I could achieve this?
Thanks!
Ian
PS - this is NAV2009R2 so I guess a dataport would work too but I'm not a NAV developer and I don't have a developer licence.
I have an Excel spreadsheet with a few thousand items in there with the weight - just two columns. What I want to do is for each "Item" in the spreadsheet column "A" get the weight from column "B" and populate the weight field in my Item table in SQL.
Can anyone show me a script by which I could achieve this?
Thanks!
Ian
PS - this is NAV2009R2 so I guess a dataport would work too but I'm not a NAV developer and I don't have a developer licence.
0
Best Answer
-
you could use data migration tool.
goto Administration --> Application Setup --> Company Setup --> Data Migration
there you can import and export excel files.
also follow http://navtips.blogspot.co.at/2013/05/usage-of-data-migration-option-in.html
for importing data via sql server, e.g. with the sql server import/export wizard, better use csv file format instead of xls format. you can export that file format with excel (save as). that results in a text file, where the values are seperated by a semicolon.
but: in general it's no good idea to import data directly to the sql database, because the nav business logic is not run through so (insert trigger, ...) . can end in inconsistent data.best regards
Franz Kalchmair, MVP
Alias: Jonathan Archer
please like / agree / verify my answer, if it was helpful for you. thx.
Blog: http://moxie4nav.wordpress.com/5
Answers
-
you could use data migration tool.
goto Administration --> Application Setup --> Company Setup --> Data Migration
there you can import and export excel files.
also follow http://navtips.blogspot.co.at/2013/05/usage-of-data-migration-option-in.html
for importing data via sql server, e.g. with the sql server import/export wizard, better use csv file format instead of xls format. you can export that file format with excel (save as). that results in a text file, where the values are seperated by a semicolon.
but: in general it's no good idea to import data directly to the sql database, because the nav business logic is not run through so (insert trigger, ...) . can end in inconsistent data.best regards
Franz Kalchmair, MVP
Alias: Jonathan Archer
please like / agree / verify my answer, if it was helpful for you. thx.
Blog: http://moxie4nav.wordpress.com/5 -
Thanks!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions