[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.sqlserver.programming

Importing into SQL Server 2005 from CSV

becka

3/22/2007 10:26:00 AM

I have 10 csv excel files that need to be imported into an SQL database. Each
csv file contains around 10,000 records of data. I need all the csv files to
be in the same table. I cannot merge all the excel files together as excel
cuts off after 64,000 ish records.

How do i go about importing these files into an existing table?
To import i right click on the database & use the wizard. & i can't see any
option on there to select which table you want to insert the data into.
I am not very familiar with SQL so simple instructions would help!
Ta!
4 Answers

Uri Dimant

3/22/2007 10:37:00 AM

0

becka

1) Take a look at SSIS to design a package
2) Take look at OPENDATASOURCE function in the BOL
3) Take a look at BCP commnad in the BOL




"becka" <becka@discussions.microsoft.com> wrote in message
news:CD44DF00-DC10-4DD7-A2C2-343162299973@microsoft.com...
>I have 10 csv excel files that need to be imported into an SQL database.
>Each
> csv file contains around 10,000 records of data. I need all the csv files
> to
> be in the same table. I cannot merge all the excel files together as excel
> cuts off after 64,000 ish records.
>
> How do i go about importing these files into an existing table?
> To import i right click on the database & use the wizard. & i can't see
> any
> option on there to select which table you want to insert the data into.
> I am not very familiar with SQL so simple instructions would help!
> Ta!


becka

3/22/2007 10:45:00 AM

0

i'm sorry this just confuses me. i have no idea what any of those are let
alone how to work them.

"Uri Dimant" wrote:

> becka
>
> 1) Take a look at SSIS to design a package
> 2) Take look at OPENDATASOURCE function in the BOL
> 3) Take a look at BCP commnad in the BOL
>
>
>
>
> "becka" <becka@discussions.microsoft.com> wrote in message
> news:CD44DF00-DC10-4DD7-A2C2-343162299973@microsoft.com...
> >I have 10 csv excel files that need to be imported into an SQL database.
> >Each
> > csv file contains around 10,000 records of data. I need all the csv files
> > to
> > be in the same table. I cannot merge all the excel files together as excel
> > cuts off after 64,000 ish records.
> >
> > How do i go about importing these files into an existing table?
> > To import i right click on the database & use the wizard. & i can't see
> > any
> > option on there to select which table you want to insert the data into.
> > I am not very familiar with SQL so simple instructions would help!
> > Ta!
>
>
>

Paul Ibison

3/22/2007 11:27:00 AM

0

Use the Import and Export Wizard in SQL Server Management Studio. The data
source will be the excel file and the destination the sql server database.
When it imports the first file it'll go to a new table called "Sheet1$". On
the Destination column you can change this name. For the first import Type a
new name for the table. Complete the wizard and execute it. For the second
file do mutch the same but you can now select the existing table name to
import into and to append the records.
Cheers,
Paul Ibison


becka

3/22/2007 11:44:00 AM

0

Ah yes i can see where it does it now ! Thanks!

"Paul Ibison" wrote:

> Use the Import and Export Wizard in SQL Server Management Studio. The data
> source will be the excel file and the destination the sql server database.
> When it imports the first file it'll go to a new table called "Sheet1$". On
> the Destination column you can change this name. For the first import Type a
> new name for the table. Complete the wizard and execute it. For the second
> file do mutch the same but you can now select the existing table name to
> import into and to append the records.
> Cheers,
> Paul Ibison
>
>
>