David Nelson Posted May 11, 2015 Share Posted May 11, 2015 I saw it was added new in 13 but I do not remember its name so I can not find it to read up on how to do it. It was something new added to SQL so we could ask for only the top x records. What is it called? Thank you for reading. Link to comment Share on other sites More sharing options...
Ocean West Posted May 11, 2015 Share Posted May 11, 2015 (edited) ExecuteSQL ( sqlQuery; fieldSeparator; rowSeparator {;arguments...} ) here is a great resource for discovering how to implement it. http://filemakerhacks.com/2012/10/19/the-missing-fm-12-executesql-reference/ offset and fetch is what you need http://help.filemaker.com/app/answers/detail/a_id/12061/~/specifying-offset-and-fetch-first-clauses-in-filemaker-pro-using-the-executesql Edited May 11, 2015 by Ocean West 2 Link to comment Share on other sites More sharing options...
David Nelson Posted May 18, 2015 Author Share Posted May 18, 2015 That was perfect. Thank you very much. Link to comment Share on other sites More sharing options...
sal88 Posted August 18, 2015 Share Posted August 18, 2015 (edited) Has anyone had a problem using fetch with arguments (i.e. substituting the value with a '?')? e.g. executesql (" SELECT * FROM t1 FETCH FIRST ?ROWS ONLY ";"";"";settings::global_row_specify) does not work for me. But this does: executesql (" SELECT * FROM t1 FETCH FIRST " & settings::global_row_specify & " ROWS ONLY ";"";"";"") Edited August 20, 2015 by sal88 Link to comment Share on other sites More sharing options...
eos Posted August 18, 2015 Share Posted August 18, 2015 Has anyone had a problem using fetch with arguments (i.e. substituting the value with a '?')? That does not work; but you can use ExecuteSQL ( " SELECT * FROM t1 FETCH FIRST " & settings::global_row_specify " ROWS ONLY " ; "" ; "" ) Link to comment Share on other sites More sharing options...
sal88 Posted August 18, 2015 Share Posted August 18, 2015 Perfect, thanks eos! Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 3181 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 accountSign in
Already have an account? Sign in here.
Sign In Now