<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Possiamo usare la seguente query
dt = Open ("tablename");
r = dt << Get Rows Where (: testid in ('1', '2'));
Grazie Jeff, questo illumina un po 'l'esempio.
PMroz e Craige @ JMP sono giusti.
ho frainteso Craige @ JMP L'esempio
Ecco uno che potrebbe essere più chiaro.
dt=open("$SAMPLE_DATA\Big Class.jmp");
//get the rows for ages 13 and 17
age13and17=dt<<get rows where(contains({"13", "17"}, char(:age)));
//select those rows
dt<<select rows(age13and17);
-Jeff
Se hai molti valori da cercare, la soluzione C Hales è la strada da percorrere. Funziona in modo simile a un elenco SQL IN.
BTW quando JMP sta per inserire SQL nel prodotto ???? PROC SQL è in SAS da molto tempo ormai.
JMP non ha una funzione In () SQL fa .
Dovrai testare ogni valore individualmente, in questo modo:
dt = Open("tablename");
r = dt << Get Rows Where(:testid == '1' | :testid == '2');
-Jeff
ci sono probabilmente altri modi, eccone uno:
r = dt << Get Rows Where (contains ({"" F "," M "}, sex));
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]