Solved

ssis sql2005: ole db source issue

Posted on 2011-09-14
7
356 Views
Last Modified: 2013-11-10
hi all

i have an ole db source in an ssis package which is connected to an excel document.
all seemed to be working fine until i noticed that i was getting random null values for my stock codes in the sql table destination!
now as far as i can see the issue resides with stock codes which have letters..

i have tried changing the stock code column data type to string, unicode string etc to no avail

anyone any ideas?
0
Comment
Question by:malraff
7 Comments
 
LVL 10

Accepted Solution

by:
Makrini earned 500 total points
Comment Utility
It's because Excel uses the first 8 lines to determine the data type, and ignores anything that doesn't fit..

i.e in your first 8 rows of data, the majority of your stock codes are numeric only, so when the Jet driver queries it, it blanks out text values as Null.


You can work around it by making sure that the first 8 rows of data are in the format you want.  If often make the first 8 garbage - you could have stock code "a" - then filter out that stock code when you get it up to the SSIS package
0
 
LVL 21

Expert Comment

by:huslayer
Comment Utility
0
 

Author Comment

by:malraff
Comment Utility
i changed the excel column type to text and it seems to work fine

now all of a sudden a lookup i am doing is retrieving no information ! it was working fine!
dosnt matter if  i change the stockcode type back to general - it simply returns nothing

very strange behavior
0
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
LVL 21

Expert Comment

by:Alpesh Patel
Comment Utility
Please change data type to DT_WSTR
0
 
LVL 21

Expert Comment

by:huslayer
Comment Utility
Use no Cache and see if it works
0
 

Author Comment

by:malraff
Comment Utility
just found issue - all of a sudden it decides it wants the stockcode field trimmed !!
0
 
LVL 21

Expert Comment

by:huslayer
Comment Utility
always LTrim(RTrim())  or Trim() your columns to avoid spaces..
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now