cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Jackie_
Level VI

JSL Scripting Index to add all columns

Hi,

 

Does JMP have any syntax or index to add all columns instead of manually typing all the column names?

 

 

Thanks

2 REPLIES 2
Georg
Level VII

Re: JSL Scripting Index to add all columns

Depends on where you want to go exactly and how to work. The easiest Answer would be to use custom SQL, and SQL has the * to select all columns.

See example.

In the Query Builder GUI you have also the Button "Add All".

...

 

Names Default To Here( 1 );
Clear Log();

// Query table with filter conditions
dt_filter = New SQL Query(
	Version( 130 ),
	Connection( "JMP" ),
	JMP Tables( ["BigClass" => "$SAMPLE_DATA\Big Class.jmp"] ),
	QueryName( "SQL_QUERY" ),
	CustomSQL( "SELECT distinct t1.* FROM BigClass  t1 where t1.sex = 'M' and t1.age<=15;" )
) << Run;
Georg
Georg
Level VII

Re: JSL Scripting Index to add all columns

Additional idea:

Leave the select empty and put a null condition on an index etc (a column that must contain values), then you get an empty table with the column names, that you can use to fill in your JSL Query Object with the column names ...

 

Names Default To Here( 1 );

New SQL Query(
	Version( 130 ),
	Connection( "JMP" ),
	JMP Tables( ["Big Class" => "$SAMPLE_DATA\Big Class.jmp"] ),
	QueryName( "SQLQuery1" ),
	Select,
	From( Table( "Big Class", Alias( "t1" ) ) ),
	Where( Is Null( Column( "name", "t1" ), UI( NullTest( Base( "Categorical" ) ) ) ) )
) << Run;
Georg