Rich Posted April 5, 2018 Posted April 5, 2018 (edited) I read the FM v16 SQL Reference (Page 9) but I don't think it gave me the whole skinny on using non-alphanumeric field names so I'm stuck. Using this formula works: ExecuteSQL ( "SELECT COUNT ( k_StudentID ) FROM EXPERIENCE WHERE k_StudentID = ? " ; "" ; "" ; k_StudentID ) ...but the real name of the field is _k_StudentID, so the leading underscore character is the troublemaker. In the Guide it says to use double-quote marks but FileMaker Pro squawks with an error message when I use them so I'm missing something. What's the correct syntax to make this formula work? Thanks in advance for your help. Edited April 5, 2018 by TeacherEd
Ocean West Posted April 6, 2018 Posted April 6, 2018 you need to escape fields with underscores.. ExecuteSQL ( "SELECT COUNT ( \"_k_StudentID\" ) FROM EXPERIENCE WHERE \"_k_StudentID\" = ? " ; "" ; "" ; k_StudentID ) 1
Rich Posted April 6, 2018 Author Posted April 6, 2018 Thanks! (For anybody copying and pasting Ocean West's formula and finding that it doesn't work, it's because the third k_StudentID fieldname is missing its leading underscore character; _k_StudentID works.) 1
Recommended Posts
This topic is 2479 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now