0
顧客番号を受け入れて、各注文とアイテムの詳細をエディタウィジェットに出力します。 エディタウィジェット(editor-1をオブジェクト名として表示)に表示します。進捗状況を使用して結果フィールド値をエディタウィジェットに表示する方法4gl
define temp-table ttcustomer
field custnum like customer.cust-num
field cname like customer.name
field orders like order.order-num
field items like item.item-num
field itemname like item.item-name .
find first customer WHERE customer.cust-num = input f1 NO-LOCK .
create ttcustomer .
assign
ttcustomer.custnum = customer.cust-num
ttcustomer.cname = customer.name.
for each order WHERE Order.cust-num = input f1 NO-LOCK .
assign
ttcustomer.orders = order.order-num.
for each order-line where order-line.order-num = order.order-num no-lock.
for each item where item.item-num = order-line.item-num no-lock.
assign
ttcustomer.items = item.item-num
ttcustomer.itemname = item.item-name.
end.
end.
end.
あなたが言ったコードを使ってみましたが、私は割り当てようとしているところで、ttcustomerテーブルを更新できないというエラーが表示されています。 – sri
あなたのコードを読んでいました。あなたがこれを行うには、Progressの構文とコマンドが少しうまくいくかを理解する必要があります。 最初に、最初にttcustomerを作成すると、1つのレコードが作成されます。各注文ループの中の後続の割り当ては、以前の値を上書きします。アイテムにも同じように、ループ内でサイクリングしている人の数にかかわらず、1つのレコードになります。 一時テーブルについて少し調べてから、情報を連結してください。可能であれば、いくつかのチュートリアルや正式なトレーニングに従ってください。 – bupereira
ありがとう@bupereira :) – sri