Note: 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.
New SQL Query(
	Connection(
		"ODBC Connection String..."
	),
	QueryName( "g6_Movies" ),
	Select( Column( "ItemNo", "t1" ), Column( "LengthMins", "t1" ), Column( "Genre", "t1" ) ),
	From( Table( "g6_Movies", Schema( "SQBTest" ), Alias( "t1" ) ) )
) << Run Background( On Run Complete( dt = queryResult ) );
 
Show( dt );
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 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.

Help created on 7/12/2018