2

--- code line where issue came

mysql -u root -p --execute="UPDATE mysql.tSub_SubJob SET Error_Description = '$errorMarkDown' WHERE sub_job_name='$line'"

--- Data Type $errorMarkDown LongText

-- value of $errorMarkDown which is insert into table

2019/10/22 05:07:17 - Stored_orders - ERROR (version 7.0.0.0-25, build 1 from 2016-11-05 15.35.36 by buildguy) : (stderr) rm: cannot remove '/usr/local/Data_Files/hiveworx_shell_files/AWS_Stored_orders.csv.gz': No such file or directory

-- Error

ERROR 1064 (42000) at line 1: 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 '': No such file or directory' WHERE sub_job_name='AWS_Shelves_Details'' at line 1

6
  • 1
    LongText Data Type in which i want to update .. Value is too large . i don't know what issue come while set value. Commented Oct 31, 2019 at 10:10
  • Retest it with an empty $errorMarkDown variable. Probably you have to escape the content of $errorMarkDown. Btw. It's always a bad idea to use string pasting with SQL Commented Oct 31, 2019 at 10:10
  • 1
    @jeb thanks for your response . Still same error came.. when i simple string set in $errorMarkDown variable. then it goes run fine . but when i want to set text which mentioned in my question then this error come . i think issue of too large string and special characters present in string.. Commented Oct 31, 2019 at 10:16
  • You could test that with a string with the same length of current variable but all characters set to ex. A. Or event better, you could use bind parameters How to bind parameters in mysql query? Commented Oct 31, 2019 at 11:01
  • 1
    @jeb yes i did it . it's working fine but when i set montioned above string then give error. Commented Oct 31, 2019 at 11:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.