Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4009 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Sorry for the vague title.

 

Here is the simple statement

 

ExecuteSQL("select count(Distinct Date) from Reports";"";"") 

 

The final query is more complicated than that but I simplified it because I know that the problem relies here.

 

This query will return and error ("?")

 

If I create a calculated field Date2 (=Date) and replace it in the query, then the query works.

 

The only thing I can see is that I have other fields named "Date" in other tables but as you can see these other tables are not even in the example query so it's clear that the Date is the on of the table Reports.

 

That must be a simple thing I don't get it .

Posted

I'm pretty sure that "Date" is a reserved SQL keyword.

In general it is a bad idea to name fields with the same name as is commonly used for datatypes (date, number, text,...)

Posted

Hello,

 

ExecuteSQL("select count(Distinct /"Date/" ) from Reports";"";"")  should work...

 

I agree with Wim, Date is a reserved word. , It's better to use dat to name this type of field.

Posted

Hello,

 

ExecuteSQL("select count(Distinct /"Date/" ) from Reports";"";"")  should work...

 

I agree with Wim, Date is a reserved word. , It's better to use dat to name this type of field.

 

I had already tried that and it did not work.

 

Anyway, the reserved word explanation makes sense.

 

Thanks

This topic is 4009 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.