異なるテーブルからデータを選択する私は2つのデータテーブル、dt1とdt2を持っています、そして、私はdt1を通して構文解析するために "For Each Row"という関数を使おうとしています、そしてそのループ内でdt2の対応するデータを評価します。右側のテーブルからデータを取得するには、その前に "Current Data Table(dt1 / dt2)"または送信演算子 "<<"を付ける必要がありますか。サンプルコードブロックを提供し、必要に応じて調整できるようにします。
row_count = 1;
For Each Row (
item_of_interest = dt1[row_count,1]; //Grab the value in the first column
dt2 << If ( Contains ( dt2[0,1], item_of_interest), //Look through column 1 in dt2 for that specified value in dt1
Write("Yes\!n"),
Write("No\!n");
);
row_count++;
);ありがとうございました!
Re:異なるテーブルからのデータの選択これが私があなたが探していることを通常どのように行うかの構文です:
Names default to here(1);
dt1=data table(?????);
dt2=data table(?????);
For( i = 1, i <= N Rows( dt1 ), i++,
item_of_interest = Column( dt1, 1 )[i]; //Grab the value in the first column
theRows = dt2 << get rows where( Column( dt1, 1 ) == item_of_interest );
If( N Rows( theRows ) > 0, //Look through column 1 in dt2 for that specified value in dt1
Write( "Yes\!n" )
,
Write( "No\!n" )
);
);