2 Replies Latest reply on Aug 19, 2016 5:03 PM by philmodjunk

    Field Name in SQL

    gmotta

      Hi,

       

      Trying to build  an SQL that will sum the values for the particular user currently seleted...

       

      Example:

       

      Table

       

      Field 1 Field 2

      a          1

      a          2

      b          4

      b          5

       

      This is what I got....and it works....problem is, I would like to set the WHERE Clause to whatever is currently showing on my Layout in (Field 1), so whatever shows on my layout will substitute the 'b' in the SQL).

       

      ExecuteSQL ("SELECT Sum (Field2) FROM table WHERE Field1='b'"; "" ; "" ; "")

       

      I need help!