CKonash Posted December 23, 2022 Posted December 23, 2022 Hi all. I am having a horrible time trying to fumble my way though what should be a simple ExecuteSQL calculation. I'm trying to count the number of records in the ACCOUNT table that have the value of "Bergen" in the field called CountyName. Am I doing something wrong, the calc isn't working. i've tried single and double quotes around the field value of Bergen and it doesn't change anything. Thank you in advance for looking and trying to help me. Chris ExecuteSQL ( " SELECT Count (id) FROM Account WHERE CountyName = Bergen " ;"";"")
LAIRY Posted December 23, 2022 Posted December 23, 2022 Hi, It may be best like that : ExecuterSQL ("SELECT COUNT (Id) FROM Account Where CountyName = ?" ; "" ; ¶; "Bergen") ? Happy Christmass G
comment Posted December 23, 2022 Posted December 23, 2022 (edited) 1 hour ago, CKonash said: i've tried single and double quotes around the field value of Bergen and it doesn't change anything. String literals need to be enclosed in single quotes - e .g. WHERE CountyName = 'Bergen' If that doesn't change anything then there is something else you've left out. At the very least it should change the error message. Edited December 23, 2022 by comment
Recommended Posts
This topic is 773 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