dbTalk Databases Forums  

DTS import of Excel containg zip + four codes

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss DTS import of Excel containg zip + four codes in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John L
 
Posts: n/a

Default DTS import of Excel containg zip + four codes - 11-17-2005 , 04:42 PM






All,

Is there any relief from what happens when DTSing an Excel spreadsheet into
SQL 2000 and the zip + 4 values import as NULL?

Thanks.
--
jl

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS import of Excel containg zip + four codes - 11-17-2005 , 06:21 PM






Are you seeing this

Excel Inserts Null Values
(http://www.sqldts.com/default.aspx?254)

Allan

"John L" <JohnL (AT) discussions (DOT) microsoft.com> wrote


Quote:
All,

Is there any relief from what happens when DTSing an Excel spreadsheet
into
SQL 2000 and the zip + 4 values import as NULL?

Thanks.
--
jl


Reply With Quote
  #3  
Old   
John L
 
Posts: n/a

Default Re: DTS import of Excel containg zip + four codes - 11-18-2005 , 10:36 AM



Allan,

I have tried solution #2 before and still got the same results as right now.
Rekeying would be painful since we are talking around 13,000 rows.
--
jl


"Allan Mitchell" wrote:

Quote:
Are you seeing this

Excel Inserts Null Values
(http://www.sqldts.com/default.aspx?254)

Allan

"John L" <JohnL (AT) discussions (DOT) microsoft.com> wrote in message
news:E61E6938-C4FD-439B-A176-B0E4415E46FB (AT) microsoft (DOT) com:

All,

Is there any relief from what happens when DTSing an Excel spreadsheet
into
SQL 2000 and the zip + 4 values import as NULL?

Thanks.
--
jl



Reply With Quote
  #4  
Old   
mattb
 
Posts: n/a

Default RE: DTS import of Excel containg zip + four codes - 11-21-2005 , 01:21 PM





"John L" wrote:

Quote:
All,

Is there any relief from what happens when DTSing an Excel spreadsheet into
SQL 2000 and the zip + 4 values import as NULL?

Thanks.
--
jl

YOU HAVE TO RE - FORMAT THE DATA IN EXCEL.

Best way that I have found -- is to
1) add 2 columns next to zip_code column. We'll call them column B and C.
Col A will be for Zip_codes. You will alos have the header row, so all work
will take place from row 2 to n (number of rows with data)
2) add ' (apostrephe) to B2 AND fill all down. You should see nothing, but
make sure you copy all rows down to match rows in column A (your zip_code row)
3) in cell C2 >> formula (concantenate) B2, then A2. ENTER
This will give you same data as A2 (appearance wise).
4) fill all data in column C down to row(n).
5) copy entire column C
6) PASTE SPECIAL AS VALUES to C1
7) Delete columns A & B (make sure your data in C is correct and filled all
down and is NOT formulas)
8) Add header back into C1.
Save file. >> Close file. DTS INTO SQL... This will now import varchar
rather than float values.


Reply With Quote
  #5  
Old   
John L
 
Posts: n/a

Default RE: DTS import of Excel containg zip + four codes - 11-23-2005 , 08:10 AM



Thanks Matt.
--
jl


"mattb" wrote:

Quote:

"John L" wrote:

All,

Is there any relief from what happens when DTSing an Excel spreadsheet into
SQL 2000 and the zip + 4 values import as NULL?

Thanks.
--
jl


YOU HAVE TO RE - FORMAT THE DATA IN EXCEL.

Best way that I have found -- is to
1) add 2 columns next to zip_code column. We'll call them column B and C.
Col A will be for Zip_codes. You will alos have the header row, so all work
will take place from row 2 to n (number of rows with data)
2) add ' (apostrephe) to B2 AND fill all down. You should see nothing, but
make sure you copy all rows down to match rows in column A (your zip_code row)
3) in cell C2 >> formula (concantenate) B2, then A2. ENTER
This will give you same data as A2 (appearance wise).
4) fill all data in column C down to row(n).
5) copy entire column C
6) PASTE SPECIAL AS VALUES to C1
7) Delete columns A & B (make sure your data in C is correct and filled all
down and is NOT formulas)
8) Add header back into C1.
Save file. >> Close file. DTS INTO SQL... This will now import varchar
rather than float values.

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.