[dba-SQLServer] Excel zip imports

JWColby jwcolby at colbyconsulting.com
Sat Jan 13 08:02:18 CST 2007


Update - in the end it was easier (for me) to just go back to the
spreadsheet, format the columns in question correctly (there is a "zip
special format for example) and then export it to a CSV file, then import
the CSV file.  Worked without a hitch and I had it done within about 20
minutes for two Excel files.

I'd still like to find an answer within SQL Server though.  It seems
something like the format(data,"format info") should be available but I
cannot find anything like it.

John W. Colby
Colby Consulting
www.ColbyConsulting.com

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of JWColby
Sent: Saturday, January 13, 2007 1:07 AM
To: dba-sqlserver at databaseadvisors.com
Subject: [dba-SQLServer] Excel zip imports

I imported a zip database into SQL Server from Excel.  The data out in Excel
is numeric (float according to the imported table).  As a result the leading
zeros were stripped off.  Two questions, is it possible to format fields
such as this with leading zeros as you import them (and if so how), and now
that I have it in the database, how can I get the leading zeros back.  I
 
John W. Colby
Colby Consulting
www.ColbyConsulting.com
 
_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com




More information about the dba-SQLServer mailing list