Excel SSIS query returns null columns in Excel but not in Management studio

前端 未结 2 2039
离开以前
离开以前 2021-01-24 05:31

I did my best to look around the web but this problem eludes me. I have a stored procedure in SSIS that works fine. It does a bunch of stuff eventually returning some numbers an

2条回答
  •  攒了一身酷
    2021-01-24 06:03

    I'm guessing the procedure does a final select from #results, and the desired results are visible in SQL Server management studio query analyzer; but then, when you call the procedure in an SSIS dataflow, the text data disappears on its way into your Excel Destination?

    Here are a few things to try. Use the data viewer (that's on the arrow between steps) to check that your text columns contain the desired text, downstream from the procedure call. Use the derived column widget to put the text into the desired datatype (e.g., code page 1252 for VARCHAR). SSIS is finicky about datatypes.

    Finally, try a different Destination, for example a flat text file such as a csv file. You can use the derived column widget to do concatenation and add commas and double-quote marks around the text and whatever else you would like to try. Then you can see in Notepad whether you're getting the desired output, and Excel should be able to open a csv file.

    There used to be a 64,000 limit on Excel records, but I believe that's long gone in Excel 2007. I keep hitting the 2000KB limit cutting and pasting output into Notepad (it fails silently, which is frustrating, until I remember). But your 931K records may be hitting some other limit, so try smaller output sets and see whether those work any differently.

提交回复
热议问题