Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to change character string to unique identifier

Dear All,

 

I'm new in Talend. Need your help on how to push GUID to database  (sql).

 

0683p000009M8WC.jpg

 

0683p000009M8WH.jpg

 

Error as below:

com.microsoft.sqlserver.jdbc.SQLServerException: Conversion failed when converting from a character string to uniqueidentifier.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:217)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1655)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatementBatch(SQLServerPreparedStatement.java:2087)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtBatchExecCmd.doExecute(SQLServerPreparedStatement.java:1967)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7505)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2445)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:191)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:166)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeBatch(SQLServerPreparedStatement.java:1858)
at local_project.offlinetemplate_test_0_1.offlinetemplate_test$1LimitBytesHelper_tDBOutput_1.limitBytePart1(offlinetemplate_test.java:2339)
at local_project.offlinetemplate_test_0_1.offlinetemplate_test.tDBInput_1Process(offlinetemplate_test.java:2386)
at local_project.offlinetemplate_test_0_1.offlinetemplate_test.tFileInputExcel_2Process(offlinetemplate_test.java:5676)
at local_project.offlinetemplate_test_0_1.offlinetemplate_test.runJobInTOS(offlinetemplate_test.java:6644)
at local_project.offlinetemplate_test_0_1.offlinetemplate_test.main(offlinetemplate_test.java:6494)

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Where are you getting the UniqueIdentifier from? If it is from a SQL Server DB, can you set the input column data type to Object? If you handle it as an Object it should work when you insert/update it later one.

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Where are you getting the UniqueIdentifier from? If it is from a SQL Server DB, can you set the input column data type to Object? If you handle it as an Object it should work when you insert/update it later one.