Hi,
I have a scenario where I need to compare time datatype from Datastage to Time(7) in SQL server in my update query.
Upon running below is the error message I get
The data types time and datetime2 are incompatible in the is operator
ODBC function is reading Time(7) as DateTime2 data type which is not able to compare against Time from DataStage.
any thoughts on how to achieve this?
Regards
Kumar
Comparing Time(7) in SQL server
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 60
- Joined: Tue Sep 20, 2011 10:44 pm
- Location: INDIA
-
- Participant
- Posts: 60
- Joined: Tue Sep 20, 2011 10:44 pm
- Location: INDIA
Time(7) in SQL Server is DateTime2.
When comparing Time from Datastage to DateTime2 in SQL server it's issuing a error message as mismatch in Datatypes.
We then agreed to change the datatype in the target SQL Server to DateTime which is equivalent to TimeStamp in DataStage.
We are now able to compare TimeStamp in DataStage as against to DateTime in Sql Server.
Finally managed to fix the issue by changing the datatypes.
Regards
Kumar
When comparing Time from Datastage to DateTime2 in SQL server it's issuing a error message as mismatch in Datatypes.
We then agreed to change the datatype in the target SQL Server to DateTime which is equivalent to TimeStamp in DataStage.
We are now able to compare TimeStamp in DataStage as against to DateTime in Sql Server.
Finally managed to fix the issue by changing the datatypes.
Regards
Kumar