Jump to content
Sign in to follow this  
James Gill

Cannot get simple ExecuteSQL Query to run

Recommended Posts

Hello,

I'm relatively new to SQL but I'm pretty experienced in Filemaker. Because of the addition of the ExecuteSQL command, I'm judging whether or not to move a solution that I'm currently working on over to FM12 so that I can potentially simply the ERD but I'm having trouble even getting a relatively simple ExecuteSQL calculation to run without error.

Basically, I have a table in my solution called ITAssignments that contains an text field called "id and a text field called "Who". I created a TO dedicated to the IT Assignments called SQL_ITAssignments

Here's my query:

ExecuteSQL ( "

SELECT id

FROM SQL_ITAssignments

WHERE Who = James"

; "" ; ¶ )

Unfortunately it returns a "?" and I'm not sure why...

Share this post


Link to post
Share on other sites

You need single quotes for the text string

ExecuteSQL ( "SELECT id FROM SQL_ITAssignments WHERE Who = 'James'" ; "" ; "" )

Share this post


Link to post
Share on other sites

Ah, that's why...thanks!

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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