We help IT Professionals succeed at work.
Get Started

Importing into SQL database from Excel.

124 Views
Last Modified: 2015-05-06
I have data in the following format in Excel. It was created using a transform query.

PRODUCT      CATEGORY      Sun, Jan 4 2015      Sun, Jan 11 2015      Sun, Jan 18 2015      Sun, Jan 25 2015      Sun, Feb 1 2015
A                       ABC                      3                         1                                 1                                     2.5                       1
B                       DEF                        0                         5                                  3.00                             4                       0.00
C                       GHI                              2.5                      2                                 1                                 2                              3
D                       JKL                              8                          0.00                        0.00                            7                        8
E                      MNO                      6                        6                                7                                    0.00                    5

I need to insert this data using VB.NET windows form into a SQL table of the following format

Product             Category      Qty       Year        Week
A                         ABC              3            2015        1
A                         ABC              1            2015        2
A                         ABC              1            2015        3
A                         ABC              2.5         2015       4
A                         ABC              1            2015        5
B                         DEF              0            2015        1
B                         DEF              5            2015        2
B                         DEF              3            2015        3
----
----

Which is the fastest way of doing it? The excel might have around 2000 rows and number of weeks at a time might be 5-10.
Comment
Watch Question
SQL Server Data Dude
CERTIFIED EXPERT
Most Valuable Expert 2013
Author of the Year 2015
Commented:
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE