Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Update SQL table with Excel data

Posted on 2015-02-18
8
Medium Priority
?
124 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 52

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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 52

Accepted Solution

by:
Vitor Montalvão earned 2000 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 49

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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

722 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