sparkyrose
Programmer
Hi,
I have some date data in one Db in the non-date format yyyymm. I need to copy some of it on a regular basis to another table where the destination column data type is Datetime. I'm trying to use a scheduled DTS Package to perform this task with the following code:
SELECT [Acct], [ExtRefNbr], Substring ([PerPost],5,2) + '01' + Substring ([PerPost],1,4) as Perpost
FROM ....etc
The statement works fine and produces the data (by which I mean that 200802 becomes 02012008), but when I try to run the package it fails.
I think it's something to do with putting non-date data into a datetime column but can't work out how to fix that (I'm kind of a novice at this
Any ideas are greatly appreciated!
I have some date data in one Db in the non-date format yyyymm. I need to copy some of it on a regular basis to another table where the destination column data type is Datetime. I'm trying to use a scheduled DTS Package to perform this task with the following code:
SELECT [Acct], [ExtRefNbr], Substring ([PerPost],5,2) + '01' + Substring ([PerPost],1,4) as Perpost
FROM ....etc
The statement works fine and produces the data (by which I mean that 200802 becomes 02012008), but when I try to run the package it fails.
I think it's something to do with putting non-date data into a datetime column but can't work out how to fix that (I'm kind of a novice at this
Any ideas are greatly appreciated!