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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Error in updating Row in tDB2Row

Query : ScreenShot 1

"Update "
+context.DBTableName
+" SET status = 1,processed_time="
+TalendDate.getCurrentDate()
+", last_modified_on="+TalendDate.getCurrentDate()
+" where file_name="+context.Transfer

 

 

0683p000009Lyb8.pngScreenShot 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 10683p000009LyhG.pngScreenShot2

 

 

Labels (2)
4 Replies
manodwhb
Champion II
Champion II

@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+"' "

Anonymous
Not applicable
Author

@manodwhb

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

manodwhb
Champion II
Champion II

@meetmahajan, you need to convert the date to required format for processed_time.

Anonymous
Not applicable
Author

i have converted datatype into DATE  and in data base it is also the same still i'm getting an error