dbTalk Databases Forums  

DTS and ZIP+4

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


Discuss DTS and ZIP+4 in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jeff Robinson
 
Posts: n/a

Default DTS and ZIP+4 - 01-05-2004 , 04:26 PM






I have a DTS package which transforms Excel spreadsheet data into
table data. The problem I'm having is that DTS fails to properly
parse Zip+4 entries. I specified the transformation as
"Column Copy" thinking a straight copy of that data would suffice.
For 5-digit zips it work correctly. However zip+4 entries
cause an error in DTS. Does anyone know a solution or work around to
this problem? Thanks.

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

Default Re: DTS and ZIP+4 - 01-06-2004 , 02:19 AM






Can you show me

Destination table structure?
A good example of data ?
A Failing example of data?
The error text?
What is Zip+4 ?

--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Jeff Robinson" <jeff.robinson (AT) aquilent (DOT) com> wrote

Quote:
I have a DTS package which transforms Excel spreadsheet data into
table data. The problem I'm having is that DTS fails to properly
parse Zip+4 entries. I specified the transformation as
"Column Copy" thinking a straight copy of that data would suffice.
For 5-digit zips it work correctly. However zip+4 entries
cause an error in DTS. Does anyone know a solution or work around to
this problem? Thanks.



Reply With Quote
  #3  
Old   
Jeff Robinson
 
Posts: n/a

Default Re: DTS and ZIP+4 - 01-06-2004 , 01:56 PM



Allan,

Zip+4 is the 9-digit zip code (e.g. 21045-1500). The DTS package
works flawlessly on 5-digit zip codes (e.g. 21045) but fails with the
following error on 9-digit codes:

Error: -2147213274 (80042026); Provider Error: 0 (0)
Error string: TransformCopy 'DTSTransformation__8' conversion error:
Destination does not allow NULL on column pair 1 (source column 'Zip'
(DBTYPE_R8), destination column 'PostalCode' (DBTYPE_WSTR)).
Error source: Microsoft Data Transformation Services (DTS) Data Pump
Help file: sqldts80.hlp
Help context: 30501

The table structure is as follows:

Company Name nvarchar(35)
Address1 nvarchar(255)
Address2 nvarchar(255)
City nvarchar(50)
StateorProvince nvarchar(50)
PostalCode nvarchar(20)

The data source is an Excel spreadsheet and all transformation are
"column copy". Thanks.


Jeff


"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
Can you show me

Destination table structure?
A good example of data ?
A Failing example of data?
The error text?
What is Zip+4 ?

--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Jeff Robinson" <jeff.robinson (AT) aquilent (DOT) com> wrote in message
news:a46965fb.0401051326.4c59ddcc (AT) posting (DOT) google.com...
I have a DTS package which transforms Excel spreadsheet data into
table data. The problem I'm having is that DTS fails to properly
parse Zip+4 entries. I specified the transformation as
"Column Copy" thinking a straight copy of that data would suffice.
For 5-digit zips it work correctly. However zip+4 entries
cause an error in DTS. Does anyone know a solution or work around to
this problem? Thanks.

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

Default Re: DTS and ZIP+4 - 01-06-2004 , 02:15 PM



OK I see it now

Here is what I think you need

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

Datatypes are "Best Guessed" when using Excel so

12345 = numeric
12345-1234 = char

If you mix these then the Excel driver gets all wonky

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Jeff Robinson" <jeff.robinson (AT) aquilent (DOT) com> wrote

Quote:
Allan,

Zip+4 is the 9-digit zip code (e.g. 21045-1500). The DTS package
works flawlessly on 5-digit zip codes (e.g. 21045) but fails with the
following error on 9-digit codes:

Error: -2147213274 (80042026); Provider Error: 0 (0)
Error string: TransformCopy 'DTSTransformation__8' conversion error:
Destination does not allow NULL on column pair 1 (source column 'Zip'
(DBTYPE_R8), destination column 'PostalCode' (DBTYPE_WSTR)).
Error source: Microsoft Data Transformation Services (DTS) Data Pump
Help file: sqldts80.hlp
Help context: 30501

The table structure is as follows:

Company Name nvarchar(35)
Address1 nvarchar(255)
Address2 nvarchar(255)
City nvarchar(50)
StateorProvince nvarchar(50)
PostalCode nvarchar(20)

The data source is an Excel spreadsheet and all transformation are
"column copy". Thanks.


Jeff


"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Can you show me

Destination table structure?
A good example of data ?
A Failing example of data?
The error text?
What is Zip+4 ?

--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Jeff Robinson" <jeff.robinson (AT) aquilent (DOT) com> wrote in message
news:a46965fb.0401051326.4c59ddcc (AT) posting (DOT) google.com...
I have a DTS package which transforms Excel spreadsheet data into
table data. The problem I'm having is that DTS fails to properly
parse Zip+4 entries. I specified the transformation as
"Column Copy" thinking a straight copy of that data would suffice.
For 5-digit zips it work correctly. However zip+4 entries
cause an error in DTS. Does anyone know a solution or work around to
this problem? Thanks.



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.