SQL Query condition using First value of Column not working

Hi,

I have an issue when using a condition on a date with the query editor (source is an MySQL Db).
I want to filter my query with a creation date being greater than the first value of column (last extraction date). It works while being in the Query Editor, showing the correct records :

But when I run the action, I am getting an error message :

image

I've upgraded from 5.4 to 5.6 to see if this bug has been corrected but no change.
Any idea why it is not working ?

Thanks in advance
Best,
Olivier

Is the first value in the [LastExtractionDate] column text or number?

Yes, it's a string from a format date to text :

I've found a workaround that is to put my import table into a module, set a parameter into the module, pass the first value column to the Call action and then build the SQL condition with a parameter and not anymore the first value column. That way it works :

but not the most straight forward.

Thanks
Olivier

Aha, that's why it didn't work. In EasyMorph, dates are numbers otherwise you can't compare them. The "First column value" mode works correctly, it's just the value in the column was text, not number (date).

We will make the error message more informative.

Ok. I will test that but it looks strange for me because at the beginning, I didn't format the date as a string and it was not working. If you look in the query editor the SQL generated condition is pushing the date as a formatted text string :
image

And also my workaround works with a text parameter.

Thanks
Olivier

I agree, that looks strange. We'll take a look at it.

1 Like