AnsweredAssumed Answered

ExicuteSQL problem

Question asked by RossEwing on Aug 14, 2014
Latest reply on Aug 14, 2014 by philmodjunk


ExicuteSQL problem


     Hello all, I am new to FileMaker and Even Newer to SQL so any help is appreciated.

     I am working on a Staff scheduling solution and one calculation is killing me. I have the following tables: Employee_Info, Stagehand_Shifts, Interface. My layout uses filtered portals to show a calendar for employees and I want to show a weekly total of the amount of scheduled hours for each week for each employee. I will use 5 repetitions of this calculation for each of the displayed weeks. I am able to use ExicuteSQL to return Total Hours per Employee, but when I try to use WHERE to restrict records to a date range i get no results.

     How do I need to structure the Query to filter out unwanted records. Here is what I have so far.

     ExecuteSQL (
     "SELECT Employee_ID,
     Sum (Total_Shift_Hours) 
     FROM Stagehand_Shifts
     GROUP BY Employee_ID"
     ; "," ; "" ; "")


     Thank you