Scan selected fields on a tree

Hi all,

I was wondering if there is a simple way of doing the following:

I’d like to scan some variables from a tree according to the values in another variable. For example:


  • VAR1 * VAR2 * VAR3 *

  • 137 * 45545 * ------- *
  • 139 * 23234 * 3434 *
  • 231 * 23243 * ------- *
  • 101 * 45551 * 2321 *

I’d like to have only the second and fourth row, where the variable VAR3 exists.

I tried something like: tree->Scan(“VAR1:VAR2:VAR3”,“VAR3”);
But a few rows where VAR3 has a value were ignored (they didnt appeared in the scan).

thanks for the attention.

cheers

It depends on what you mean by "where the variable VAR3 exists"
Your test will show all rows for which VAR3 is not null.

Rene

Trytree->Scan("VAR1:VAR2:VAR3","Length$(VAR3)>0");
Cheers,
Philippe