Gibt es effiziente Funktionen oder JSL für diese Wahl?Hallo, alle miteinander!
Wählen Sie beispielsweise Vorgänge wie diese beiden Dateien aus:
Dies gilt, wenn jede der beiden Spalten ein Schlüsselwort enthält.
Kann eine Funktion wie "ANY ()" mit dem Text übereinstimmen?
Vielen Dank!

d2 = Open( "$SAMPLE_DATA\Pizza Profiles.jmp" );
xF = {};
yF = {};
For( j = 1, j <= 4, j++,
Insert Into( xF, d2[j, "ID"] );
Insert Into( yF, d2[j, "Cheese"] );
);
dt = Open( "$SAMPLE_DATA\Pizza Combined No Choice.jmp" );
dt << Select Where( :Cheese == Any( Eval( yF ) ) & :Profile Name == Any( Eval( xF ) ) );
Wait( 0 );
d3 = dt << Subset( Output Table( "text" ), Selected Rows( 1 ), selected columns( 0 ) );
Wait( 0 );Natürlich funktioniert die Verwendung von "any" hier nicht.
Betreff: Gibt es effiziente Funktionen oder JSL für diese Auswahl?Hallo,
Die Funktion includes () könnte in diesem Fall das sein, wonach Sie suchen:
https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/td-p/299
d2 = Open( "$SAMPLE_DATA\Pizza Profiles.jmp" );
xF = {};
yF = {};
For( j = 1, j <= 4, j++,
Insert Into( xF, d2[j, "ID"] );
Insert Into( yF, d2[j, "Cheese"] );
);
dt = Open( "$SAMPLE_DATA\Pizza Combined No Choice.jmp" );
dt << Select Where( contains(yf,:Cheese) & contains(xf,:Profile Name));
Wait( 0 );
d3 = dt << Subset( Output Table( "text" ), Selected Rows( 1 ), selected columns( 0 ) );
Wait( 0 );