>Alan Wrote:
>Partno, del_qty no_boxes, (pallet_qty, qty_per_box - do not vary for each part)
>ABC      200          10        300   20
>ABC      200          10        300   20
>ABC      100          5         300   20

>So far so good, but some of their customers require a second barcode label 
>attached to the outer pallet (the 300 above)

>I need to produce 2 pallet labels as follows:
>Partno, del_qty no_boxes
>ABC     300         15
>ABC     200         10

You will need a field to say which pallet the items are in, for example 
palletno.

Then, 

select 
  partno, palletno, sum(del_qty), sum(no_boxes)
from yourTable
  group by partno, palletno


-Maya
  • ... 'liviusliv...@poczta.onet.pl' liviusliv...@poczta.onet.pl [firebird-support]
    • ... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
      • ... lis...@warmboot.com.br [firebird-support]
        • ... Pavel Cisar pci...@ibphoenix.cz [firebird-support]
        • ... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
    • ... 'Carlos H. Cantu' lis...@warmboot.com.br [firebird-support]
      • ... Alan J Davies alan.dav...@aldis-systems.co.uk [firebird-support]
        • ... Maya Opperman m...@omniaccounts.co.za [firebird-support]
          • ... Alan J Davies alan.dav...@aldis-systems.co.uk [firebird-support]

Reply via email to