MySQL Forums
Forum List  »  Stored Procedures

Re: Rows not deleting from table
Posted by: John Noble
Date: February 26, 2019 03:49AM

Very weird.

Using CURDATE inside the literal string makes it work.


This works....
SET @p_SQL := CONCAT('DELETE FROM ', @p_table, ' WHERE entryDate = CURDATE()');


This doesn't...
SET @p_SQL := CONCAT('DELETE FROM ', @p_table, ' WHERE entryDate = ',CURDATE());



Thanks again for your help.

Options: ReplyQuote


Subject
Views
Written By
Posted
1106
February 25, 2019 08:00AM
366
February 25, 2019 02:28PM
Re: Rows not deleting from table
352
February 26, 2019 03:49AM
329
March 09, 2019 03:58PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.