This is probably a really easy question to answer but I just cannot seem to get my head round it.
I am compiling a report of orders on a voyage and I need to show the same total charge for each container regardless of how many orders there are in the container. For example:
Order Number Number of Packages Weight Container Number Charge
AB-123456 2 1235 ABCD123456(0) 2500
AC-234598 1 200 DEFG987654(2)
AC-258468 2 589 DEFG987654(2)
AC-987654 5 1800 DEFG987654(2) 2500
AC-789555 1 200 THFC159753(1)
AC-135879 20 5521 THFC159753(1) 2500
I'm using "Select" to gather the information I need and put it in a table then I scanning it to change some of the values or add other charges. But I can seem to work out how to charge a set amount for all the orders in one container. I did think of using "Do While" but that seems antiquated. Is there a better way of doing it?
I've got this far:
SELECT S_AOIM02.M_PONUM, S_AOIM02.M_REQNUM, S_AOIM02.M_UMNUM,;
S_AOIM02.M_SHIP_FLT, S_AOIM02.M_BLCON_NO, S_AOIM02.M_QTYPACK,;
S_AOIM02.M_WTPACK, S_AOIM02.M_CUBEPACK, S_AOIM02.M_CONTNUM,;
FROM K:\SSS\S90\S-AOIM02.DBF S_AOIM02;
WHERE S_AOIM02.M_SHIP_FLT = VOYNO;
ORDER BY S_AOIM02.M_PONUM;
INTO TABLE K:\SSS\TEMPWORK\TMPVOY.DBF
Please help. My brain hurts.