![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trying to author a .dts package that will combine two number fields (in my source MS Access database) to form a date, which would then be stored as a DateTime in my destination SQL Server 2005. I'm using the following expression to create the derived colum: [Day] + "-" + [Month] + "-2005" Where Day and Month are number columns in my source MS Access Database. I'm expecting to get a result like: 31-Dec-2005. The expression I'm using to create this derived field keeps throwing an "invalid cast exception". Specifically it says, "The datatypes DT_I4 and DT_WSTR are incompatible with the binary operator +" etc.. How do I cast the [Day] and [Month] fields properly to combine them as a SQL DateTime? |
#3
| |||
| |||
|
|
I'm trying to author a .dts package that will combine two number fields (in my source MS Access database) to form a date, which would then be stored as a DateTime in my destination SQL Server 2005. I'm using the following expression to create the derived colum: [Day] + "-" + [Month] + "-2005" Where Day and Month are number columns in my source MS Access Database. I'm expecting to get a result like: 31-Dec-2005. The expression I'm using to create this derived field keeps throwing an "invalid cast exception". Specifically it says, "The datatypes DT_I4 and DT_WSTR are incompatible with the binary operator +" etc.. How do I cast the [Day] and [Month] fields properly to combine them as a SQL DateTime? |
![]() |
| Thread Tools | |
| Display Modes | |
| |