February 11, 2008 at 1:36 pm
I'm extracting columns from a CSV file.
One column, in the CSV file, has a format of general and is only populated by numbers (0 - 126); no decimal places.
During the extract, the column is copied into my staging table as an NVARCHAR value. However, after the extract, the values have all been appended with a ".0". What could be causing this?
Thanks!
February 11, 2008 at 7:21 pm
Because of implicit conversions.
A better question would be...
... why are you copying INT data into an NVARCHAR column to begin with?
--Jeff Moden
Change is inevitable... Change for the better is not.
February 12, 2008 at 10:01 am
Not sure. I inherited this package. I suppose I can just change it to INT in the destination table.
HOWEVER, when I try to import this file via the Import/Export Wizard and I preview the data, the values are still appended with ".0". Very frustrating...
February 12, 2008 at 5:39 pm
Previews lie... not sure I'd take 100% stock in the preview any more than the trust I put in an estimated execution plan (which I don't trust at all 😉 ).
Try the real thing on a smaller set of data and see what happens... you might be pleasantly surprised... or not... that's the purpose of the small test.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply