Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
If I understand correctly, you want to submit a SQL query from JMP using values held in a table. The code below uses a brute force approach to build the query string, and may give you some ideas. In this example, the values came from a user interface that required the user to select one and only one name, and one or more products.
reps = repsObj <<GetSelected;
prod = prodObj <<GetSelected;
if(NItems(reps)!=1,Beep();Dialog("WARNING: You need to select a name");Throw());
if(NItems(prod)<1,Beep();Dialog("WARNING: You need to select at least one product");Throw());
// Build the resulting query
SQLQuery ="SELECT * FROM Final WHERE salesrep_name = '"||reps;
// Simple to build the query
SQLQuery = SQLQuery||"' AND product_group = '"||prod||"';",
// else takes a bit more work
prodPart ="' AND (product_group = '"||prod;
for(i=2, i<=NItems(prod), i++, prodPart = prodPart||"' OR product_group = '"||prod[i]);