GJT
Registered User.
- Local time
- Today, 10:45
- Joined
- Nov 5, 2002
- Messages
- 116
I have a contract number which is a five digit code. For phased deliveries i.e. where items in the same order are to be delivered on different dates, the contract has an additional identifier (1-9) to identify the batch.
i.e. 31022 (Base contract)
310221 (1st phase)
310222 (2nd phase)
etc......
I am trying to write some SQL to return the total invoiced quantity count for these contracts ie. for 31022 + 310221 + 310222 etc.
So, for :
Jobnumber InvQty
31022 10
310221 1
310222 1
Hence, the output could be :
Jobnumber InvQty
31022 12 (note : the base contract only is displayed but the count includes all subsequent contracts)
I am not too sure how to write the appropriate code to do this. Any ideas? Can you help?
Thanks
i.e. 31022 (Base contract)
310221 (1st phase)
310222 (2nd phase)
etc......
I am trying to write some SQL to return the total invoiced quantity count for these contracts ie. for 31022 + 310221 + 310222 etc.
So, for :
Jobnumber InvQty
31022 10
310221 1
310222 1
Hence, the output could be :
Jobnumber InvQty
31022 12 (note : the base contract only is displayed but the count includes all subsequent contracts)
I am not too sure how to write the appropriate code to do this. Any ideas? Can you help?
Thanks
Last edited: