Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Query : ScreenShot 1
"Update "
+context.DBTableName
+" SET status = 1,processed_time="
+TalendDate.getCurrentDate()
+", last_modified_on="+TalendDate.getCurrentDate()
+" where file_name="+context.Transfer
ScreenShot 1
Error : ScreenShot 2
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'May 29 13:41:09 IST 2018, last_modified_on=Tue May 29 13:41:09 IST 2018 where fi' at line 1ScreenShot2
@meetmahajan,can you try with below one?
"Update "
+context.DBTableName
+" SET status = 1,processed_time="
+"'"+TalendDate.getCurrentDate()+"'"
+", last_modified_on="+"'"+TalendDate.getCurrentDate()+"'"
+" where file_name="+"'"+context.Transfer+"' "
I Tried but getting Data Truncation Error
Error
Data truncation: Incorrect datetime value: 'Tue May 29 16:42:20 IST 2018' for column 'processed_time' at row 1
@meetmahajan, you need to convert the date to required format for processed_time.
i have converted datatype into DATE and in data base it is also the same still i'm getting an error