Five Stars

Manage MSSQL Identity field with tCreateTable

Hi
I'm trying to make a INT identity field with autoincrement but I get this error :

Exception in component tCreateTable_1 (File_rotate)
java.lang.RuntimeException: Creating table failed
	at swiss_project.file_rotate_0_1.File_rotate.tCreateTable_1Process(File_rotate.java:1215)
	at swiss_project.file_rotate_0_1.File_rotate.tFileInputXML_1Process(File_rotate.java:14346)
	at swiss_project.file_rotate_0_1.File_rotate.tFileList_1Process(File_rotate.java:15702)
	at swiss_project.file_rotate_0_1.File_rotate.runJobInTOS(File_rotate.java:19262)
	at swiss_project.file_rotate_0_1.File_rotate.main(File_rotate.java:18988)
Caused by: java.sql.SQLException: Identity column 'AST00' contains invalid INCREMENT.
	at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
	at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
	at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
	at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
	at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613)
	at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572)
	at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:809)
	at net.sourceforge.jtds.jdbc.JtdsStatement.execute(JtdsStatement.java:1282)
	at swiss_project.file_rotate_0_1.File_rotate.tCreateTable_1Process(File_rotate.java:1203)
	... 4 more





talend_create_table.PNGThanks in advance

 

 

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Seven Stars

Re: Manage MSSQL Identity field with tCreateTable

You would have to specify the precision too for INT IDENTITY. Just mention Length = 1 & Precision = 1 which would be Seed & Increment respectively.
Also, you have mentioned db type variables as NCHAR but Talend type as Integer. You need to change them too.
2 REPLIES
Seven Stars

Re: Manage MSSQL Identity field with tCreateTable

You would have to specify the precision too for INT IDENTITY. Just mention Length = 1 & Precision = 1 which would be Seed & Increment respectively.
Also, you have mentioned db type variables as NCHAR but Talend type as Integer. You need to change them too.
Five Stars

Re: Manage MSSQL Identity field with tCreateTable

Not logic at all but it work. Thanks !