Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel field returning NULLS in SQL field...

Status
Not open for further replies.

plymakr88

Programmer
Mar 3, 2004
4
US
I'm importing an Excel file into SQL using a DTS package. There's a column in the Excel file called 'Description.' There are two fields in my SQL table called 'DetailDesc' and 'ShortDesc.' Both of these fields point to the same 'Description' column in my Excel file. The only exception is that the 'ShortDesc' field is only grabbing the first 40 characters (using Left function). After running the DTS package, I see that the 'DetailDesc' imported correctly, but the 'ShortDesc' returned all blanks. I thought maybe it had something to do with the Left function I was using, so I took it off and did the same import as the 'DetailDesc.' But now it just returns NULLs. So I'm doing the exact same thing with two different SQL fields pointing to an Excel column, with one importing it correctly and the other returning NULLs. Has anyone seen anything like this before?
 
Ok, I think I've narrowed it down a little more. It's when the two SQL fields are accessing the same column that I'm getting the problem. If I take away either one, the other works fine, but with both, the second link created receives NULLs. Any ideas concerning this?
 
I forgot to mention that when I test the import links from within the ActiveX properties, I see the data fine. But when it's actually executed, it's NULLs. So I'm not sure why it will work in test mode, but not during execution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top