2 Replies Latest reply on Apr 20, 2012 10:26 AM by philmodjunk

    ExecuteSQL function: unable to SELECT field

    brisance

      Title

      ExecuteSQL function: unable to SELECT field

      Post

      I have a bunch of TEXT and NUMBER fields. If I run the following ExecuteSQL, it returns a row as expected:

      ExecuteSQL ( "SELECT * FROM test WHERE REFNO='000137'"; ", "; "¶" )

      However, if I rewrite the function to return just a field called "FIRST" as follows:

      ExecuteSQL ( "SELECT FIRST FROM test WHERE REFNO='000137'"; ", "; "¶" )

      or

      ExecuteSQL ( "SELECT test.FIRST FROM test WHERE REFNO='000137'"; ", "; "¶" )

      I get an "?". Why? I have tried changing the field type from TEXT to NUMBER with the same outcome. The field contains a valid value because it turns up when I search for it in "Find" mode.

      Setup: Windows 7 with FMP12 Advanced.