Solved

Update SQL table with Excel data

Posted on 2015-02-18
8
112 Views
Last Modified: 2015-03-18
I have an Excel spreadsheet with data that needs to be appended to and added to fields in a SQL db.  This is similar to a question with nearly the same syntax however there was no code or script in the answer other than referring to NuGet .Net.  It is ID: 27840398 asked by eseinc and answered by Gary Davis.  I'm new to useing Visual Studio and don't know where to begin.  Will I be using a CS or VB project or a different project code base?  This will be an ongoing task so creating a project that is persistent is exactly what I need.
0
Comment
Question by:gibneyt
  • 3
  • 2
8 Comments
 
LVL 49

Expert Comment

by:Vitor Montalvão
ID: 40616598
You can do it directly in the SQL Server Management Studio (SSMS). Just open SSMS, connect to the target SQL Server instance and right-click on the desired database name and chose Tasks / Import Data...
TaskMenu.PNGNow you just need to follow the wizard. Simple as that.
0
 

Author Comment

by:gibneyt
ID: 40616693
Not quite as simple as that I think.  I didn't explain fully.  One field in SQL, it already contains data, needs to be appended with an additional string and another field in the same table needs to be written to with a new string.  The SQL table Mfg_Part_Master has these pertinent fields:  PRTNUM_49, MPNNUM_49, MPNMFG_49, and UDFREF_49 and the spreadsheet has these pertinent fields:  PRTNUM_49, MPNNUM_49, MPNMFG_49, and [REACH Y N].  The PRTNUM_49 and MPNNUM_49 joins will give me my unique matches.  I need to append "<two spaces>(R)" to the contents of Mfg_Part_Master.MPNMFG_49 and write "RoHS/REACH 7/2014" to the field Mfg_Part_Master.UDFREF_49 where <ExcelSpreadsheet>.[REACH Y N] ='Y'.  I am fairly proficient with SQL but need help in creating the Visual Studio project that will allow me to run this process every week.
0
 

Author Comment

by:gibneyt
ID: 40618957
Anybody?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 49

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 40619118
What you need it's something more elaborated than a simple column match. I'ld go for SSIS package but let's see if some Expert can help you with Visual Studio.
0
 

Author Comment

by:gibneyt
ID: 40619123
@Vitor Agreed.  And thanks for the direction.
0
 
LVL 47

Expert Comment

by:Martin Liss
ID: 40672900
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need age at date of document 5 21
Need quicker response from an Execption table 11 24
Adjust the codes 3 37
Pivot Table Help 6 18
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question