I have created a very simple Data Flow in SSIS that is run inside a loop.
IMAGE 1 http://img407.imageshack.us/img407/1553/step1f.jpg
I have a simple OLE DB Source control which is connecting to a SQL Server and running quite a complex query to split daily data by 30 minute intervals as shown below.
IMAGE 2 http://img168.imageshack.us/img168/857/step2vs.jpg
I then have a Flat File Destination control which is taking the output from the OLE DB Source control and saving it as a comma-delimited CSV file. As you can see above the numbers are dec开发者_如何学Cimal numbers to two decimal places but in the CSV file below it is showing as ones and zeros.
IMAGE 3 http://img341.imageshack.us/img341/5494/step3w.jpg
What can I do to get the CSV output to match the query input? I have tried converting the numbers to varchar in the query but I got the same result. I also tried changing the column types in the Connection Manager too but got the same result.
I have managed to resolve this issue by changing all the DataType properties for each column of data I was importing. I had to change them to 'double-precision float [DT_R8]' and then it saved the CSV with the proper decimal values.
Very annoying, I hope that helps someone.
IMAGE 4 http://img687.imageshack.us/img687/3749/step4dp.jpg
精彩评论