How to Transfer data from Excel to SQL SERVER 2000

A

Ahmad Jalil Qarshi

hi!

i want to transfer data from MS Excel Sheets to SQL Server. is there any
way.


Thanks

Ahmad Jalil Qarshi
 
T

Tom Moreau

The simplest way is to use the DTS Import Wizard.

--
Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
hi!

i want to transfer data from MS Excel Sheets to SQL Server. is there any
way.


Thanks

Ahmad Jalil Qarshi
 
J

Jens Süßmeyer

YOu can import that from SQL Server using

-DTS
-Linked Servers
-OPENROWSET
-OPENDATASOURCE
 
G

Guest

Make sure you have header records in your excel file. Then click in first
column first row and hit ctrl+shift+end which should highlight everything.
Then go to file save as then for the type choose csv. Then in Enterprise
Manager click on database you want it to go into then right click and choose
import data. For Source choose text which is the last option, then browse
for file you made .csv then on destination choose db its going into if not
alreay specificed and then when you get to the import format screen click
first row has column names and then click next. You should see all data with
proper column names. Then next and run and you should have all data.

You might have to go back and change fields size specifications because it
makes all columns 255 which is not a good practice for final table. Also
when you save the file as type csv it will give you errors and ask you if you
want to save over file. Just say yes it will also do the same thing when you
go to close out of file just click save again and over right otherwise the
file might get messed up if you hit cancel or no to saving file.

Hope this helps.
 
G

Guest

If you don't choose .csv format, you can use .xls. In .csv format all column
will be interpreted as varchar. But if you transfer from excel, it can be
different respect to the column types in excel. But, there is an important
point.
 
G

Guest

Excuse, my message is ongoing.
....But, there is an important point. Look your .xls file. Sometimes a colons
can be different types such as half of one column date and remaining is
string. In this position sql will interpret this column as DateTime. But
there can be error in string part. So, string part can be null.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top