Henri de Vos
Member
Hi All,
I have a dynamic temp table with lots of fields, a dynamic query with the field list option. If I want to fill the temp table I can use the buffer-copy statement and use the exception-list. But if I want to assign just three fields (art-code, art-oms from the first buffer and mrk-oms from the second buffer) the exception list gets really long. Is there another way to fill the temp table without the use of buffer-copy?
Example
ASSIGN v-str_que = "FOR EACH art FIELDS ( art.art-code art.art-oms ) , FIRST mrk FIELDS ( mrk.mrk-oms ) OF art NO-LOCK MAX-ROWS 100 INDEXED-REPOSITION".
v-hdl_que:QUERY-OPEN.
v-hdl_que:QUERY-PREPARE(v-str_que).
REPEAT WHILE v-hdl_que:GET-NEXT(NO-LOCK):
v-hdl_tmp_tbl:BUFFER-CREATE.
v-hdl_tmp_tbl:BUFFER-COPY(v-hdl_buf[1],"xxx,xxx,...,zzz,zzz").
v-hdl_tmp_tbl:BUFFER-COPY(v-hdl_buf[2],"xxx,xxx,...,zzz,zzz").
END.
Any help appreciated.
I have a dynamic temp table with lots of fields, a dynamic query with the field list option. If I want to fill the temp table I can use the buffer-copy statement and use the exception-list. But if I want to assign just three fields (art-code, art-oms from the first buffer and mrk-oms from the second buffer) the exception list gets really long. Is there another way to fill the temp table without the use of buffer-copy?
Example
ASSIGN v-str_que = "FOR EACH art FIELDS ( art.art-code art.art-oms ) , FIRST mrk FIELDS ( mrk.mrk-oms ) OF art NO-LOCK MAX-ROWS 100 INDEXED-REPOSITION".
v-hdl_que:QUERY-OPEN.
v-hdl_que:QUERY-PREPARE(v-str_que).
REPEAT WHILE v-hdl_que:GET-NEXT(NO-LOCK):
v-hdl_tmp_tbl:BUFFER-CREATE.
v-hdl_tmp_tbl:BUFFER-COPY(v-hdl_buf[1],"xxx,xxx,...,zzz,zzz").
v-hdl_tmp_tbl:BUFFER-COPY(v-hdl_buf[2],"xxx,xxx,...,zzz,zzz").
END.
Any help appreciated.