该帮助的版本不再更新,请参见https://www.jmp.com/support/help/zh-cn/15.2 获取最新的版本.


注意:Database table names that contain the characters $# -+/%()&|;? are not supported.
Converts an expression to code that you can use in an SQL Select statement. Use Expr(...) for literal expressions. Use NameExpr(name) for expressions stored in a variable. Otherwise, the expression returns the expression to convert.
Boolean. JMP 12 Compatible is included in generated scripts when you select the Query Builder preference to create a JMP 12 compatible option or select the corresponding Query Builder red triangle menu option. The option enables JMP 12 users to run a JMP 13 query that might contain compatibility issues. Include Run on Open(1) to run the query when opened rather than opening the query in edit mode.
Note that Query Builder creates a symbol called queryResult in the context of an On Run Complete() script. This is a reference to the data table imported by the query. queryResult enables you to assign a global variable to the table for later use.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
result = Query( Table( dt, "t1" ), "SELECT * FROM t1 WHERE age > 14;" );
See Appendix A, “SQL Functions Available for JMP Queries” for details about SQLite commands that Query() supports. See “Writing a SQL Query” in the Scripting Guide for more examples.