selecting two or more keywords from two or more columns using JSL<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />i need some help in selecting extracting some keywords from few columns and getting entire rows that have the keywords. Forexample, i have the keywords " socket" and "ball". I want to extract these two keywords from column 1 and column 2. A new datasheet should contain all the rows that contain the two keywords :socket" and "ball"
here is my part of code:
rows2=dt<
sheet1=dt<
the above script only takes one keyword "socket" from one column "column1"
could anyone help with this?
Re: selecting two or more keywords from two or more columns using JSLUse an AND (&) and an OR (|). Note the judicious use of parentheses. If this isn't quite what you need you now have the tools (& and |) to build the correct statement.
rows2 = dt << get rows where((contains(:column 1,"socket") & contains(:column 2, "ball")) |
(contains(:column 1,"ball") & contains(:column 2, "socket")));
Re: selecting two or more keywords from two or more columns using JSLUse the AND statement (&
rows2 = dt << get rows where(contains(:column 1,"socket") & contains(:column 2, "ball"));