How to get rows with more than one condition?Hi,
I'm trying to get rows with more than one condition as so:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
r = dt << Get Rows Where( :sex == "F", :name == "ROBERT", :name != "MARK" );
Show( r );
But what I'm getting is only rows where : sex == "F",
Is there any way to get all rows that are :name == "ROBERT", and also rows that are :name != "MARK" i.e. the :name rows where it is not "MARK"
Data TableScriptingRe: How to get rows with more than one condition?Hi,
Have you tried to build your condition as a logic statement (see below)?
r = dt << Get Rows Where( :sex == "F" | (:name == "ROBERT" | :name != "MARK" ));
This should return all the rows with Female, Roberts, or NOT Mark.
Best,
TS
Re: How to get rows with more than one condition?The relevant logical operators in JSL are & for AND, | for OR, and ! for NOT.