AnsweredAssumed Answered

ExecuteSQL formula

Question asked by info@musiktrends.com on Nov 13, 2017
Latest reply on Nov 14, 2017 by info@musiktrends.com

I have the following issue:

 

I need to match the "Date Worked" with the "DateID" in order to return the related value. Or do I? For example, on 1/4/14 18.46 hours were worked. On 1/15/14 12.73 hours were worked. On 1/16/14 10.49 hours were worked.

As you can see the value, 18.46 is returned in EVERY because the ExecuteSQL command I wrote is obviously not dynamic enough.

 

This is what I wrote:

 

Round(ExecuteSQL (

"select sum(HoursWorked)

FROM LaborTable where DateWorked='1/4/14'"; "" ; "" ; "" );2).

 

I tried replacing '1/4/14' with (Select ID from DatesTable) but it didn't work

 

My goal is to replace "1/4/14" with the matching Dates Table ID. I hope I worded this question so that it's understandable.

 

MySQL image.png

Thank you.

Outcomes