If you are copying/pasting the query from Valentina to Xojo, try pasting it into a plain text editor, then copying it from there. I’ve had problems with invalid characters in these situations.
It means to count all the records (based on GROUP BY) … the “1” could be anything , usually developers use “*” or “8”… but its value is only important unless you are counting SPECIFIC values (a discussion for another time)
so in this case the field “quota” will contain a count for each unique value of dataLocate
Is the error on the assignment to the StrSQL variable or on execution of the SQL? If on execution, perhaps the “AS NO,” in the second line is clashing with a reserved word for the database, which then returns an error which gets interpreted as a SQL Syntax issue.
Yes, this is the problem I’ve encountered more than once. There are invisible characters in there that causes issues with the Xojo plugin. I don’t know if they’re always present in the Valentina editor, or only added when copying from it.
Just seeing this thread now, I already reported this to the valentina developers a week ago btw. They will display non printable characters in their sql editor in an upcoming version.