Solved

Update SQL table with Excel data

Posted on 2015-02-18
8
116 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
8 Comments
 
LVL 50

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 50

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

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

734 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