Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Teachme
Starting Member
45 Posts |
Posted - 2006-09-07 : 23:15:05
|
Can anyone please show me how can i convert char datatype columns of a source table to decimal data type columns of a destination table while transferring data from source table to destination table in the same database using DTS package. Thanks |
|
Rishi Maini SQL2K5 Admin
Yak Posting Veteran
80 Posts |
Posted - 2006-09-08 : 03:11:28
|
Just create a simple DTS Package with two connection strings connected by a Transformation Task and DTS should automatically take care of the conversion from 'char' to 'decimal' till you have numeric values for the 'char' column in your source that can fit in the 'decimal' destination column.Are you stuck somewhere in doing this ?Let us knowThanksRishi Maini |
|
|
Teachme
Starting Member
45 Posts |
Posted - 2006-09-08 : 09:21:49
|
It doesn't work sir. it gives an error of mismatch datatypes. i think i wud have to writed vbscript for transformation for those columns but im not sure what function and how i wud do that. Thanksquote: Originally posted by Rishi Maini SQL2K5 Admin Just create a simple DTS Package with two connection strings connected by a Transformation Task and DTS should automatically take care of the conversion from 'char' to 'decimal' till you have numeric values for the 'char' column in your source that can fit in the 'decimal' destination column.Are you stuck somewhere in doing this ?Let us knowThanksRishi Maini
|
|
|
Teachme
Starting Member
45 Posts |
Posted - 2006-09-08 : 14:38:20
|
thanks i got it...quote: Originally posted by Teachme It doesn't work sir. it gives an error of mismatch datatypes. i think i wud have to writed vbscript for transformation for those columns but im not sure what function and how i wud do that. Thanksquote: Originally posted by Rishi Maini SQL2K5 Admin Just create a simple DTS Package with two connection strings connected by a Transformation Task and DTS should automatically take care of the conversion from 'char' to 'decimal' till you have numeric values for the 'char' column in your source that can fit in the 'decimal' destination column.Are you stuck somewhere in doing this ?Let us knowThanksRishi Maini
|
|
|
|
|
|