July 26, 2008 at 12:29 am
Hi there,
I am using SSIS for converting CSV file into SQL table.
here one of the column contains numbers and by default, I am getting it as a nvarchar datatype. But I want to turn it to Numeric datatype.
I tried using Derived column for converting it... but while doing so, I am getting error:
data conversion error 348 -- There could be potential data loss and hence can't be processed.
I also tried using Convert function... but my problem is I have some blank field in the column and hence, I get error again.
So, I am wondering how can I convert this particular column to numeric datatype.
I tried expanding numeric (18,0) to max i.e. (38,0) but still,it fails.
Please help me
Thanks
July 26, 2008 at 11:44 am
The issue could be with the empty values. You may want to check for empty string in the Derived Column conversion and set that to Null.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
July 26, 2008 at 12:59 pm
I think you are correct. Its empty values causing the problem. Using conditional split, I was able to get only those rows where data contains numbers i.e. numeric values. I used ISNUMERIC().
Now,I am thinking what should I do with these empty value cells. I am thinking to convert those blanks to NULL and then, can merge these rows to original table.
As of now, I don't know how to do that... but i think CONVERT etc should work.
Thanks
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy