Matt Klein Posted February 11, 2013 Posted February 11, 2013 Hi all - I am just now beginning to play around with the new ExecuteSQL() function in FM12 and I have a couple of questions regarding it's use: 1) Is it possible to use ExecuteSQL to select a set of records where a field on those records as a certain value in it when that field contains more than one value on each record? Kind of like using a multi-key field in a relationship. 2) Along those same lines....if you create a join in a SQL query do the fields used in the join have to contain a single value each or can either or both fields have multiple values? Thanks!
Ocean West Posted February 13, 2013 Posted February 13, 2013 it's generally avoided to use sql to query a "multi-key" you would have to use a %like% operator if memory serves. If you haven't had a chance try out the sample kits for testing: http://www.seedcode.com/cp-app/ste_cat/sqlxfree or http://fmforums.com/forum/files/file/25-sql-builder/
beverly Posted July 26, 2013 Posted July 26, 2013 Hmm, sorry, just getting back to the forums... If "multi-line" sort of thing, can you convert it to comma-delimited instead of return-delimited and use WHERE .. IN ... ? That's basically an 'OR' query using a list of values. Numbers are not single quoted value in the list, but text is: WHERE xxx IN (1,2,3) WHERE yyy IN ('a','b','c') With some calcing this should work using your "values".
Recommended Posts
This topic is 4149 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