SQL statement strange results (Source & Destination OLE DB connections)
When I use my SQL statement directly on the SSMS database Query pane I get the results that I expect. However, when I use the very same statement on the BIDS OLE DB Data Flow Source, one of the columns returns NULL for all the rows (more than a million). I have checked everything, including the following listed, and can’t tell why that is happening. 1. Destination table column data type - it is consistent with source 2. Mapping between source and destination – it is correct 3. There are no transformation containers between the source and the destination. It’s a straight forward package. I’m stuck and frustrated. Any ideas please will be happily welcome. Many thanks. Mpumelelo
May 13th, 2011 8:57am

How are you determining that it is returning NULL for all the rows? Via a Data Viewer right after the Source Adapter? What do you see when you click the PREVIEW button on the Source Adapter? Can you give us an example of the query you are running?Todd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
May 13th, 2011 9:05am

The query that I’m running is a very long query. It was initially a stored procedure and I have decided to run it straight as a query with the hope that maybe there might be a change. Please note that out of 28 columns, its only one column which is giving the NULL result. I’ve determined the NULL by going to the destination table in SSMS and queried that column DISTINCT, and all that I got is NULL. When I preview the source Adapter I get all the columns specified in the query as expected and surprisingly, data on the offending column. Thank you for that tip. So what could be the problem with the destination table?Mpumelelo
May 13th, 2011 9:19am

First add a Data Viewer in the pipeline to view the data as it comes out of the Source. If that shows correct data, then the issue is probably in the Destination Adapter. Try deleting it and re-adding it.Todd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
May 13th, 2011 9:22am

Thank you so much. This thing has taken a lot of my time, and perhaps added a few grey hairs on my head, trying to figure out what the problem could be. All sorted now.Mpumelelo
May 13th, 2011 9:34am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics