Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Array elements 1

Status
Not open for further replies.

Peterw9

Technical User
Dec 11, 2001
16
GB
I am trying to select each element form an field array - 52 elements and create individual records in a temp table.

Woul appreciate if anyone could help with an easy way of doing this??

Thanks in advance.
 
This may be overly simplistic but this is where I would start based on what I think you've described:
Code:
     def var i as int init 0 no-undo.

     def temp-table t-file
         field t-field as char/int/logi format ...
         index i-index {is unique}
            t-field ascending/descending
         .

     for each record no-lock:
        do i = 1 to 52:
           create t-file.
           assign
              t-file.t-field = record.field[i].
        end.
     end.
Hope this helps,
sshowers
 
Many Thanks does what it says on the packet..
Peterw9
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top