Bonjour,
j'ai cette erreur dans talend qui va me rendre ding !! :
suite a cette requete :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 Exception in component tMSSqlInput_7 java.sql.SQLException: Incorrect syntax near 'Oct'. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258) at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632) at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:477) at net.sourceforge.jtds.jdbc.JtdsStatement.executeQuery(JtdsStatement.java:1304) at itics_new.ods_gdh_vms_work_order_0_1.ODS_GDH_VMS_WORK_ORDER.tMSSqlInput_7Process(ODS_GDH_VMS_WORK_ORDER.java:5572) at itics_new.ods_gdh_vms_work_order_0_1.ODS_GDH_VMS_WORK_ORDER.tWarn_11Process(ODS_GDH_VMS_WORK_ORDER.java:2880) at itics_new.ods_gdh_vms_work_order_0_1.ODS_GDH_VMS_WORK_ORDER.tWarn_3Process(ODS_GDH_VMS_WORK_ORDER.java:2756) at itics_new.ods_gdh_vms_work_order_0_1.ODS_GDH_VMS_WORK_ORDER.tWarn_1Process(ODS_GDH_VMS_WORK_ORDER.java:2632) at itics_new.ods_gdh_vms_work_order_0_1.ODS_GDH_VMS_WORK_ORDER.tJava_1Process(ODS_GDH_VMS_WORK_ORDER.java:2508) 2015-10-14 18:10:21|gXRb9o|gXRb9o|gXRb9o|ITICS_NEW|ODS_GDH_VMS_WORK_ORDER|Default|6|Java Exception|tMSSqlInput_7|java.sql.SQLException:Incorrect syntax near 'Oct'.|1 [statistics] disconnected at itics_new.ods_gdh_vms_work_order_0_1.ODS_GDH_VMS_WORK_ORDER.runJobInTOS(ODS_GDH_VMS_WORK_ORDER.java:7868) at itics_new.ods_gdh_vms_work_order_0_1.ODS_GDH_VMS_WORK_ORDER.main(ODS_GDH_VMS_WORK_ORDER.java:7611)
mon champ INSERT_DATE est en date "yyyy-MM-dd' 'HH:mm:ss" et LASTRUN un string au format "yyyy-MM-dd' 'HH:mm:ss"
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 String dbquery_tMSSqlInput_7 = "SELECT ODS_VMS_IMPORT.INSERT_DATE FROM ODS_VMS_IMPORT where ODS_VMS_IMPORT.INSERT_DATE>" + TalendDate.parseDate("yyyy-MM-dd' 'HH:mm:ss",context.LASTRUN);
une idée des données dans insert_date :
et dans LASTRUN
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 2015-10-14 16:59:58.000 2015-10-14 16:59:58.000 2015-10-14 09:26:09.000 2015-10-14 09:26:09.000 2015-10-14 09:26:09.000 2015-10-14 09:26:09.000et quand j'ai essayé avec les milliseconde:
Code : Sélectionner tout - Visualiser dans une fenêtre à part 2015-10-14 16:05:27
j'obtiens :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 String dbquery_tMSSqlInput_7 = "SELECT ODS_VMS_IMPORT.INSERT_DATE FROM ODS_VMS_IMPORT where ODS_VMS_IMPORT.INSERT_DATE>" + TalendDate.parseDate("yyyy-MM-dd' 'HH:mm:ss.SSS",context.LASTRUN);
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 Exception in component tMSSqlInput_7 java.lang.RuntimeException: java.text.ParseException: Unparseable date: "2015-10-14 16:05:27" at routines.TalendDate.parseDate(TalendDate.java:823) at itics_new.ods_gdh_vms_work_order_0_1.ODS_GDH_VMS_WORK_ORDER.tMSSqlInput_7Process(ODS_GDH_VMS_WORK_ORDER.java:5565) at itics_new.ods_gdh_vms_work_order_0_1.ODS_GDH_VMS_WORK_ORDER.tWarn_11Process(ODS_GDH_VMS_WORK_ORDER.java:2880) at itics_new.ods_gdh_vms_work_order_0_1.ODS_GDH_VMS_WORK_ORDER.tWarn_3Process(ODS_GDH_VMS_WORK_ORDER.java:2756) at itics_new.ods_gdh_vms_work_order_0_1.ODS_GDH_VMS_WORK_ORDER.tWarn_1Process(ODS_GDH_VMS_WORK_ORDER.java:2632) at itics_new.ods_gdh_vms_work_order_0_1.ODS_GDH_VMS_WORK_ORDER.tJava_1Process(ODS_GDH_VMS_WORK_ORDER.java:2508) at itics_new.ods_gdh_vms_work_order_0_1.ODS_GDH_VMS_WORK_ORDER.runJobInTOS(ODS_GDH_VMS_WORK_ORDER.java:7868) at itics_new.ods_gdh_vms_work_order_0_1.ODS_GDH_VMS_WORK_ORDER.main(ODS_GDH_VMS_WORK_ORDER.java:7611) Caused by: java.text.ParseException: Unparseable date: "2015-10-14 16:05:27" at java.text.DateFormat.parse(Unknown Source)
help please :'
Partager