Unix Technical Forum

Importing from Excel problems

This is a discussion on Importing from Excel problems within the SQL Server forums, part of the Microsoft SQL Server category; --> What do others do if you need to import excel files into SQL Server? My main problems are 1) ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-01-2008, 03:46 PM
scoots987
 
Posts: n/a
Default Importing from Excel problems

What do others do if you need to import excel files into SQL Server?
My main problems are

1) zipcode formatting issues. If the column is a mix of zip and zip+4,
I have problems retrieving all zipcodes.

2) If the last column contains NULL no information is imported.

All this with using the Management console using Import data in SQL
Server 2005. I am simply trying to import the data into NEW databases.
The excel files vary in structure. Right now I am working on case by
case basis.

Does anyone see these types of problems?

What I am doing now is converting the excel file to a tab delimited
file and that seems to work.

TIA.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-01-2008, 03:46 PM
jhofmeyr@googlemail.com
 
Posts: n/a
Default Re: Importing from Excel problems

On Dec 11, 12:32 pm, scoots987 <scoots...@gmail.com> wrote:
> What do others do if you need to import excel files into SQL Server?
> My main problems are
>
> 1) zipcode formatting issues. If the column is a mix of zip and zip+4,
> I have problems retrieving all zipcodes.
>
> 2) If the last column contains NULL no information is imported.
>
> All this with using the Management console using Import data in SQL
> Server 2005. I am simply trying to import the data into NEW databases.
> The excel files vary in structure. Right now I am working on case by
> case basis.
>
> Does anyone see these types of problems?
>
> What I am doing now is converting the excel file to a tab delimited
> file and that seems to work.
>
> TIA.


Hi scoots987,

I usually use a dummy row in my excel files to force the correct data
types and column mappings (typically I import everything as text and
convert it downstream). One of the big problems with importing data
from an Excel file is that SQL Server (well .. the I think it's
actually the OLEDB driver) only looks at the first 8 rows of data to
determine what data types to use. To force it to look at more rows,
you need to change a couple registry settings, which in my experience
is usually off-limits in a managed production environment (check out
http://blog.lab49.com/?p=196 for info .. it's not a SQL blog, but it
explains the issue well).

Good luck!
J
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-01-2008, 03:46 PM
aj
 
Posts: n/a
Default Re: Importing from Excel problems

I've recently had great experience importing Excel into the DB using
SSIS (SQL Server Integration Services) and the OLE DB Excel Connection.
It has transforms and all sorts of goodies to make the import easy and
omplete.

HTH

aj

scoots987 wrote:
> What do others do if you need to import excel files into SQL Server?
> My main problems are
>
> 1) zipcode formatting issues. If the column is a mix of zip and zip+4,
> I have problems retrieving all zipcodes.
>
> 2) If the last column contains NULL no information is imported.
>
> All this with using the Management console using Import data in SQL
> Server 2005. I am simply trying to import the data into NEW databases.
> The excel files vary in structure. Right now I am working on case by
> case basis.
>
> Does anyone see these types of problems?
>
> What I am doing now is converting the excel file to a tab delimited
> file and that seems to work.
>
> TIA.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-01-2008, 03:47 PM
Jack Vamvas
 
Posts: n/a
Default Re: Importing from Excel problems

Yes , these problems are common . Transforming to a tab delimited is a good
idea.
You could automate this and set it up as a job - dts

--

Jack Vamvas
___________________________________
Search IT jobs from multiple sources- http://www.ITjobfeed.com




"scoots987" <scoots987@gmail.com> wrote in message
news:7d46ad3b-34a8-432e-826e-1b884854b9be@s12g2000prg.googlegroups.com...
> What do others do if you need to import excel files into SQL Server?
> My main problems are
>
> 1) zipcode formatting issues. If the column is a mix of zip and zip+4,
> I have problems retrieving all zipcodes.
>
> 2) If the last column contains NULL no information is imported.
>
> All this with using the Management console using Import data in SQL
> Server 2005. I am simply trying to import the data into NEW databases.
> The excel files vary in structure. Right now I am working on case by
> case basis.
>
> Does anyone see these types of problems?
>
> What I am doing now is converting the excel file to a tab delimited
> file and that seems to work.
>
> TIA.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:47 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com