EdHubbard
18th August 2003, 14:39
I wish to create a session that can update the alternative items table based on rules of how our item coding is structured (and also belonging to a range of item groups).
So, our item code is structured into 4 parts - width, gauge, type & colour. If gauge, type & colour are the same then the item is a satisfactory alternative.
In my example code below, I can select my list of possible items and my calc.film.features function creates an array of the 3 features above. But I am now stuck! At the point marked ***, I need to move on to the next item and test whether its features are the same as my current one - if so I need to insert it into the alternative items table.
We are talking of around 1000 items that change frequently - new widths being added for example.
Any help would be gratefully received! thanks
function read.main.table()
{
citg.f = "AF0000"
citg.t = "AFZZZZ"
select tiitm001.item:otheritm
from tiitm001
where tiitm001._index8 between {:citg.f}
and {:citg.t}
selectdo
select tiitm011.item
from tiitm011
where tiitm001._index1 = {:otheritm}
selectdo
selectempty
calc.film.features(otheritm)
*** select tiitm001.item:otheritm
from tiitm001
where tiitm001._index8 between {:citg.f}
and {:citg.t}
endselect
So, our item code is structured into 4 parts - width, gauge, type & colour. If gauge, type & colour are the same then the item is a satisfactory alternative.
In my example code below, I can select my list of possible items and my calc.film.features function creates an array of the 3 features above. But I am now stuck! At the point marked ***, I need to move on to the next item and test whether its features are the same as my current one - if so I need to insert it into the alternative items table.
We are talking of around 1000 items that change frequently - new widths being added for example.
Any help would be gratefully received! thanks
function read.main.table()
{
citg.f = "AF0000"
citg.t = "AFZZZZ"
select tiitm001.item:otheritm
from tiitm001
where tiitm001._index8 between {:citg.f}
and {:citg.t}
selectdo
select tiitm011.item
from tiitm011
where tiitm001._index1 = {:otheritm}
selectdo
selectempty
calc.film.features(otheritm)
*** select tiitm001.item:otheritm
from tiitm001
where tiitm001._index8 between {:citg.f}
and {:citg.t}
endselect