Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 DTS Excel inserting NULLS

Author  Topic 

mwcontois
Starting Member

1 Post

Posted - 2011-06-07 : 12:14:08
Hi Folks,
I have a DTS package that migrates excel sheets to sql 2000 data tables. The problem is that if one of the attributes in the excel table is null in the first few rows, it is populating Null for that attribute for ALL of the inserted rows (excel General format, sql integer data type).

The table contains admission and discharge data. Rows with discharge dates are populating the date attribute correctly, but the discharge reason code (int) is NULL just because the first few rows don't have a discharge code (because they are new admissions without a discharge date/code yet). These sheets are sent in by remote sites and I have no access to them...they are generated from a local Access database and the attribute is in excel General format.

How can I get the dts to read each row for what it is and insert accordingly and not have the dts make an assumption about attribute contents by the first few rows? It correclty inserts the discharge date field, regardless of the first few rows but the integer discharge code (int) field is not populating unless I sort the excel sheet first so that non NULL values are in the top few rows...than it works. Any thoughts?

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-06-08 : 07:50:46
Are you explicitly setting the correct data types in the transformation task?

DTS will guess based on the first few rows if you don't.
Go to Top of Page
   

- Advertisement -