Datetime2(7) issue in SQl server 2008
Posted: Thu Dec 01, 2011 9:10 pm
Hi All,
I'm trying to insert data in to SQL server 2008 table. The data type is Datetime2(7) and I tried all the combinations like using functions like below in transformer
StringToTimestamp(TimestampToString(CurrentTimestamp(),"%yyyy-%mm-%dd %hh:%nn:%ss"):'.000000',"%yyyy-%mm-%dd %hh:%nn:%ss.6")
In DRS stage I made SQL type as Timestamp and extended as "microseconds" and in length I mentioned as 26 and scale as 6
I'm getting warning's as
Metadata mismatch for column 'CRETD_TP': Datastage column type and database column type differ.
Metadata mismatch for column 'CRETD_TP': PRECISION Expected = 20, Actual = 27
Metadata mismatch for column 'CRETD_TP': SCALE Expected = 3, Actual = 0
I also tried
StringToTimestamp(TimestampToString(CurrentTimestamp(),"%yyyy-%mm-%dd %hh:%nn:%ss"):'.000',"%yyyy-%mm-%dd %hh:%nn:%ss.3")
In DRS stage I made SQL type as Timestamp and extended as "microseconds" and in length I mentioned as 23 and scale as 3
I'm getting warning's as
Metadata mismatch for column 'CRETD_TP': Datastage column type and database column type differ.
Metadata mismatch for column 'CRETD_TP': PRECISION Expected = 20, Actual = 27
Metadata mismatch for column 'CRETD_TP': SCALE Expected = 3, Actual = 0
And finally changed DRS stage I made SQL type as Varchar(27)
TimestampToString(CurrentTimestamp(),"%yyyy-%mm-%dd %hh:%nn:%ss") and it is working fine but I'm still getting a single warning
Metadata mismatch for column 'CRETD_TP': Datastage column type and database column type differ
Is there any way I can supress the above warning with out using message handler or any work around to solve the aboe issue
Thanks,
Raju
I'm trying to insert data in to SQL server 2008 table. The data type is Datetime2(7) and I tried all the combinations like using functions like below in transformer
StringToTimestamp(TimestampToString(CurrentTimestamp(),"%yyyy-%mm-%dd %hh:%nn:%ss"):'.000000',"%yyyy-%mm-%dd %hh:%nn:%ss.6")
In DRS stage I made SQL type as Timestamp and extended as "microseconds" and in length I mentioned as 26 and scale as 6
I'm getting warning's as
Metadata mismatch for column 'CRETD_TP': Datastage column type and database column type differ.
Metadata mismatch for column 'CRETD_TP': PRECISION Expected = 20, Actual = 27
Metadata mismatch for column 'CRETD_TP': SCALE Expected = 3, Actual = 0
I also tried
StringToTimestamp(TimestampToString(CurrentTimestamp(),"%yyyy-%mm-%dd %hh:%nn:%ss"):'.000',"%yyyy-%mm-%dd %hh:%nn:%ss.3")
In DRS stage I made SQL type as Timestamp and extended as "microseconds" and in length I mentioned as 23 and scale as 3
I'm getting warning's as
Metadata mismatch for column 'CRETD_TP': Datastage column type and database column type differ.
Metadata mismatch for column 'CRETD_TP': PRECISION Expected = 20, Actual = 27
Metadata mismatch for column 'CRETD_TP': SCALE Expected = 3, Actual = 0
And finally changed DRS stage I made SQL type as Varchar(27)
TimestampToString(CurrentTimestamp(),"%yyyy-%mm-%dd %hh:%nn:%ss") and it is working fine but I'm still getting a single warning
Metadata mismatch for column 'CRETD_TP': Datastage column type and database column type differ
Is there any way I can supress the above warning with out using message handler or any work around to solve the aboe issue
Thanks,
Raju