Jump to content
Server Maintenance This Week. ×

ExecuteSQL - Join tables


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

Recommended Posts

HI,

 

I'm attempting to join two tables in my Select statement for my executeSql function. All I'm getting back is '?' although if I select from each table seperately I get restults

I know the select statement is correct as I've tested it seperately (outside of filemaker) with a sample of the data.

Is FM capable of working through semi complicated SQL queries? The help seems to suggest it can deal with joins!

This is my script and as you'll see it's not very complicated at all.

 

ExecuteSQL(
"SELECT b.TermDesc, a.ObsDate, a.Grade
 FROM TutorObservations a
 INNER JOIN SchoolYear b on (a.ObsDate ≥ b.StartDate) and (a.ObsDate ≤ b.EndDate)
 ";
"|"; "¶"

)

TIA

Link to comment
Share on other sites

Try using proper (non-FM style) operators:

ExecuteSQL ( "
  SELECT S.TermDesc, T.ObsDate, T.Grade
  FROM TutorObservations T
  JOIN SchoolYear S
    ON T.ObsDate >= S.StartDate AND T.ObsDate <= S.EndDate
  " ; "|" ; ""
)

Edited by eos
Link to comment
Share on other sites

This topic is 3215 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.