FileMaker 12 and ExecuteSQL



我有一个有效的方法:

ExecuteSQL ( "Select  email_Full from staffing where Branch = ? and EmployeeID  = ? and Title= ?"; " "; " "; "001" ; "33748"; "Supv V" ) 

但我需要第一个参数在001-300的范围内;第二个参数大于0,第三个参数可以是Supv、Supv 1、Supv2、Supv4或Supv 5

我所有的尝试都失败了。

我建议:

 ExecuteSQL ( " Select  email_Full from staffing 
                WHERE Branch = ? 
                AND EmployeeID  = ? 
                AND Title= ?
                AND EmployeeID > 0
                AND Branch BETWEEN 1 AND 300
                AND Title IN ("Supv", "Supv 1", "Supv 2", "Supv 4" or "Supv 5")"; 
                ""; ""; GetAsNumber("001") ; "33748"; "Supv V" ) 

我不确定EmployeeID检查,我认为你实际上需要not NULL而不是>0

我在参数级别将Branch强制转换为数字,因此您将不得不根据IN或LIKE的字符串列表对其进行测试。

试试这个:

ExecuteSQL ( "SELECT email_Full FROM staffing WHERE Branch < 300 AND EmployeeId > 0 AND Title LIKE '%Supv%'" ; "" ; "" )

我在ExecuteSQL("Select email_Full from personnel where Branch=?and Employee_ID>?and Title LIKE?";";";";"024";"1";"Supv%")

如果我为分支使用FileMaker字段,它会为所有分支返回完整的电子邮件。我一次需要一个。

相关内容

  • 没有找到相关文章

最新更新