0

I have a simple query that I'm sure anyone whos not a novice will be able to easily solve, I have a table which has a bunch of 'tags' for instagram. I am trying to extract TAGS where DATE = today.

A rough copy of what I want is shown below, I know the syntax is incorrect which is why I'm struggling, but I think you can see what I'm trying to achieve, any advice welcome :)

ExecuteSQL 

(  

SELECT IGs::tag 

FROM IGs:: 

WHERE IGs::creation date = 22/10/2048

;)

However I would prefer that creation date = $$todaysdate ( I will set the variable before the ExecuteSQL in the script.

1

1 Answer 1

1

You need to use quotes around the query. Something like this.

ExecuteSQL 
(  
    "SELECT tag 
    FROM IGs 
    WHERE \"creation date\" = ?"
    ;"";"";$$todaysdate
)
Sign up to request clarification or add additional context in comments.

2 Comments

Andreas coming to my aid once again! I owe you a beer mate! That's cracked it, thankyou once again.
No problem @Sean, glad to help. Be aware that FileMaker's ExecuteSQL is fragile and breaks easily if you later change a field name or table name. There are many ways to work around that, my favorite way is to use a couple of custom functions that takes advantage of FileMaker's built-in robustness against such things and also handles quotes automatically. More on those here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.