Change in MySQL calculations

Reply
Highlighted
Black Belt

Change in MySQL calculations

Has anyone else noticed that your MySQL dataflows started to evaluate expressions differently?

 

Yesterday, I was using this where clause to filter for yesterday's date and it was working

WHERE `Date` = CURDATE()-1

Admittedly, this is a lazy way of doing it... but, well... coders are lazy 🙂

 

Today, this clause was returning no results.  I had to change the clause to 

WHERE `Date` = DATE_SUB(CURDATE(), INTERVAL 1 DAY)

Using CURDATE()-1 still seems to work in beastmodes.  Just not in my MySQL dataflow


______________________________________________________________________________________________
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman
______________________________________________________________________________________________
Highlighted
Black Belt

select version() or select @@version will tell you the MySQL version number.

 

As long as it's still 5.6 (i believe) then the version of SQL didn't change and it's unlikely the problem was a change in MySql...


Jae Wilson
Check out my Domo Training YouTube Channel

**Say "Thanks" by clicking the heart in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"
Highlighted
Black Belt

this is what I get for select version()

 

5.6.28-76.1-56

 

 


______________________________________________________________________________________________
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman
______________________________________________________________________________________________
Highlighted
Black Belt

Yeah so still same version as ever.  It's unlikely that it was due to a glitch in MySQL...


Jae Wilson
Check out my Domo Training YouTube Channel

**Say "Thanks" by clicking the heart in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"
Announcements
Domopalooza 2021 Call for Presenters: We want to hear how Domo is revolutionizing the way you do business!

Click here to submit your story.