InstructionWhich7142
Registered User.
- Local time
- Today, 20:16
- Joined
- Feb 24, 2010
- Messages
- 206
I have two tables, one of orders and one of deliveries,
however if an order/delivery is scheduled I cannot compare the two easily as there is no unique reference (badly designed system I'm trying to work around
)
we have Order number, and Line number, but not Schedule Line number,
is there a way to look at a list of dates and quantities and compare the two?
i have an excel example of the type of data attached, basically how do i programmatically match lines like that?:
(if a single order line is split over multiple deliveries we would measure against the latest delivery that completes the line and carry the balance over to the next line.)
i read the posting guides so i know guess work is not always welcome, but i also dont just want a lump of code, i'd like to work out how to do this, its just a tad beyond me in places
if thats the right way to go about this then i think i can work out the first bit but i dont want to go down that route if its a total dead end,
the second part i'm stuck on though,
however if an order/delivery is scheduled I cannot compare the two easily as there is no unique reference (badly designed system I'm trying to work around

we have Order number, and Line number, but not Schedule Line number,
is there a way to look at a list of dates and quantities and compare the two?
i have an excel example of the type of data attached, basically how do i programmatically match lines like that?:
(if a single order line is split over multiple deliveries we would measure against the latest delivery that completes the line and carry the balance over to the next line.)
i read the posting guides so i know guess work is not always welcome, but i also dont just want a lump of code, i'd like to work out how to do this, its just a tad beyond me in places
- my first thought is to create a temp table for every order number and line (would i be able to get around the table number limit if i did this sequencially and passed it back onto a master table?)
- then somehow run something against each temp table to compare the dates, matches the quantities and prints back the delivery date against the schedule date
if thats the right way to go about this then i think i can work out the first bit but i dont want to go down that route if its a total dead end,
the second part i'm stuck on though,