inside the pack-line index there are 3 fields company, pack-no, and pack-line. What I need to do is when the company that purchased from us receives our product and somehow misplaces the packing number they can call us, we pull up our shipping program, input the order number and operator can easily see the last packing number from the order, its just a matter of convenience.
I think I am not getting the concept of indexing as well. What exactly does indexing a particular column accomplishes? Also here is the code from the old program that used to work...:
for each pack-line
where pack-line.company = g-co-id
and pack-line.order-no = static-so-no
no-lock use-index order-line :
if not last-pack matches ("*" + string(pack-line.pack-no) + "*")
then last-pack = last-pack + string(pack-line.pack-no) + ",".
end. /*for eachpackline gb 7/21*/
Also tamhas we only have one company, but for some reason I have to include the g-co-id statement, otherwise processes take forever (i guess b/c it was designed for multi company).
Thanks.