Search code examples
sqlfilemaker

Execute SQL Simple Query


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.


Solution

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

    ExecuteSQL 
    (  
        "SELECT tag 
        FROM IGs 
        WHERE \"creation date\" = ?"
        ;"";"";$$todaysdate
    )