data conversion errors . please advice me the possible ways to get rid of these errors
September 1st, 2012 1:03pm
First of all get rid of the warnings.
Either you have to increase the size of you destination fields i.e.
City change to VARCHAR(100)
Zip change to VARCHAR(7)
Phone change to VARCHAR(12)
Phone2 change to VARCHAR(12)
Or use derived column transformation to trim the values to the desired size.
Secondly, fir your data conversion errors it seems like there is a datatype miss match such as you are trying to update a datetime field with an integer which is not possible. Look at your error and try to sort out the suggestions in your error results which
are quite descriptive.
Even if you still cannot sort out the issue you can share your errors and some description like how you are receiving and we can help you out.
Hope this helps-Please mark the post as answered if it answers your question
Free Windows Admin Tool Kit Click here and download it now
September 1st, 2012 1:11pm
The warnings are for possible truncation that might happen as your source column length metadata is less than the destination column length metadata. So review the data type lengths in source and destination, If you cannot then truncate the source to the
destination data lenght using derived column/ data conversion transformation. The error on the source is because OpenDate is a datetime field and you are trying to cast/ convert it into a numeric field, work on that. The error on the destination is because
you are trying to map an integer source column to NextCycleDate column which is of type datatime, work on that.http://btsbee.wordpress.com/
September 1st, 2012 2:24pm
Thanks alot dinesh
Free Windows Admin Tool Kit Click here and download it now
September 1st, 2012 4:19pm
thanks alot
September 1st, 2012 4:19pm
i had given the following code to get rid of those errors
SELECT
CAST(CAST(Nextcycledate AS VARCHAR(8)) AS DATETIME),
case WHEN LEN(LTRIM(RTrIM(OPENDATE))) = 5
then CAST(CAST(('20' + '0' +LTRIM(RTrIM(OPENDATE))) AS VARCHAR(8)) AS DATETIME)
when LEN(LTRIM(RTrIM(OPENDATE))) = 6
then CAST(CAST(('20' +LTRIM(RTrIM(OPENDATE))) AS VARCHAR(8)) AS DATETIME)
end AS OPENDATE
Free Windows Admin Tool Kit Click here and download it now
September 1st, 2012 4:22pm