Varchar to Timestamp
Posted: Thu Aug 28, 2008 11:49 am
Hi Folks,
I've been working to solve two issues, but haven't been successful as yet. So, decided to lay down the issue here to see if anyone can help me:
1)
ETL Map Source : Flat-File
ETL Map Target : SQL Server 2005 Table
There's a field in the flat file with values similar to -> 9/28/2007 (mm/dd/yyyy) without any time component, which will get mapped to a field in my target table defined using the Datetime datatype with values similar to -> 2007-09-28 00:00:00.000 (Timestamp)
I've been facing problems in the transformer stage trying to convert the incoming Varchar field into a Datetime field!
Logs show a warning stating that the conversion function to convert to a timestamp_from_string is not working.
I used a PEEK to see the contents of this field and all i can see is -> SRV_Date: **********
Can anyone help me resolve this issue ?
2)Within the same FlatFile is an Amount field with values similar to -> $330.00 which will get mapped to an Amount field in the target table defined as a Decimal (19,2)
Effort is to remove the prefixed - '$' symbol before loading the table. I tried using StringToDecimal but this didn't work !
For both the issues above, can anyone give me the right SYNTAX as in examples so that i can get these hurdles out of the way ASAP !
I've been working to solve two issues, but haven't been successful as yet. So, decided to lay down the issue here to see if anyone can help me:
1)
ETL Map Source : Flat-File
ETL Map Target : SQL Server 2005 Table
There's a field in the flat file with values similar to -> 9/28/2007 (mm/dd/yyyy) without any time component, which will get mapped to a field in my target table defined using the Datetime datatype with values similar to -> 2007-09-28 00:00:00.000 (Timestamp)
I've been facing problems in the transformer stage trying to convert the incoming Varchar field into a Datetime field!
Logs show a warning stating that the conversion function to convert to a timestamp_from_string is not working.
I used a PEEK to see the contents of this field and all i can see is -> SRV_Date: **********
Can anyone help me resolve this issue ?
2)Within the same FlatFile is an Amount field with values similar to -> $330.00 which will get mapped to an Amount field in the target table defined as a Decimal (19,2)
Effort is to remove the prefixed - '$' symbol before loading the table. I tried using StringToDecimal but this didn't work !
For both the issues above, can anyone give me the right SYNTAX as in examples so that i can get these hurdles out of the way ASAP !