Hello everybody
When importing data, I got the error message converting from varchar to datetime. I was able to correct a few cases by changing the data type of some columns from datetime to datetime2, but the columns with primary or secondary keys I hesitate to do so.
Can you tell me how to fix these problems?
Samples of messages :
2020-04-28 04:37:09 (+0:00:00.000) INFO: IBM Catalog Library Version: 9.2.18.0
2020-04-28 04:37:09 (+0:00:00.063) ERROR: Java::ComMicrosoftSqlserverJdbc::SQLServerException: La conversion dâun type de donnĂ©es varchar en type de donnĂ©es datetime a crĂ©Ă© une valeur hors limites.: merge into ibm.software_components t using (
select
scp.id,
stv.software_title_guid as root_guid
from ibm.software_components scp
join ibm.software_relationships sr on sr.sink_guid = scp.guid
join ibm.software_title_releases str on str.guid = sr.source_guid and str.is_component = 1
join ibm.software_title_versions stv on stv.guid = str.software_title_version_guid
where scp.valid_to = '9999-12-31 23:59:59.997â
and sr.valid_to = '9999-12-31 23:59:59.997â
and str.valid_to = '9999-12-31 23:59:59.997â
and stv.valid_to = â9999-12-31 23:59:59.997â
) as tmp on
t.id = tmp.id
when matched and
t.root_guid is null or t.root_guid <> tmp.root_guid
then
update set t.root_guid = tmp.root_guid;
2020-04-28 04:37:09 (+0:00:00.000) WARN: Lâinstruction a Ă©tĂ© arrĂȘtĂ©e.
2020-04-28 04:37:09 (+0:00:00.000) ERROR: Error updating root_guid columns for blue software components #<Sequel::DatabaseError: DBNAME: temadb - Java::ComMicrosoftSqlserverJdbc::SQLServerException: La conversion dâun type de donnĂ©es varchar en type de donnĂ©es datetime a crĂ©Ă© une valeur hors limites.>
2020-04-28 04:37:16 (+0:00:00.001) ERROR: Sequel::DatabaseError: DBNAME: temadb - Java::ComMicrosoftSqlserverJdbc::SQLServerException: La conversion dâun type de donnĂ©es varchar en type de donnĂ©es datetime a crĂ©Ă© une valeur hors limites.
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(com/microsoft/sqlserver/jdbc/SQLServerException.java:258)
com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(com/microsoft/sqlserver/jdbc/tdsparser.java:256)
com.microsoft.sqlserver.jdbc.TDSParser.parse(com/microsoft/sqlserver/jdbc/tdsparser.java:108)
com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(com/microsoft/sqlserver/jdbc/SQLServerStatement.java:1531)
com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(com/microsoft/sqlserver/jdbc/SQLServerStatement.java:845)
com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(com/microsoft/sqlserver/jdbc/SQLServerStatement.java:752)
com.microsoft.sqlserver.jdbc.TDSCommand.execute(com/microsoft/sqlserver/jdbc/IOBuffer.java:7151)
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(com/microsoft/sqlserver/jdbc/SQLServerConnection.java:2478)
com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(com/microsoft/sqlserver/jdbc/SQLServerStatement.java:219)
com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(com/microsoft/sqlserver/jdbc/SQLServerStatement.java:199)
com.microsoft.sqlserver.jdbc.SQLServerStatement.executeUpdate(com/microsoft/sqlserver/jdbc/SQLServerStatement.java:680)
java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:508)
org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:453)
org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:314)