Please help! I am having trouble with this.
I am trying to query records with duplicate Invoice Number and combine the other fields in duplicate records to the first record. Sounds confusing but I will illustrate below the source table and the desired result required:
In the source table, all records have the same Invoice Reference. Line 1 and 2 have the same LINESEQ (114688). I want to make a query that combines the Serial in line 2 in line 1 under a different column (Phone).
For line 4, I want it added as another column in line 3 (same LINESEQ as line 4).
SOURCE TABLE:
=============
LN INV ITEMNBR DATE SERIAL CUST LINESEQ
1. 14247 NOK6230i 03/07/05 3569937795666 James 114688
2. 14247 BI95 03/07/05 97918983 James 114688
3. 14247 NOK6230i 03/07/05 3569937795777 James 180224
4. 14247 BI55 03/07/05 97799922 James 180224
5. 14247 SAMD500 03/07/05 3569937795193 James 212992
6. 14247 BI55 03/07/05 97989433 James 212992
DESIRED QUERY RESULT:
=====================
INV ITEMNBR DATE SERIAL PHONE CUST LINESEQ
14247 NOK6230i 03/07/05 3569937795666 97918983 James 114688
14247 NOK6230i 03/07/05 3569937795777 97799922 James 180224
14247 SAMD500 03/07/05 3569937795193 97989433 James 212992
Your help is greatly appreciated.
Many thanks in advance.
Cheers
bokasen
I am trying to query records with duplicate Invoice Number and combine the other fields in duplicate records to the first record. Sounds confusing but I will illustrate below the source table and the desired result required:
In the source table, all records have the same Invoice Reference. Line 1 and 2 have the same LINESEQ (114688). I want to make a query that combines the Serial in line 2 in line 1 under a different column (Phone).
For line 4, I want it added as another column in line 3 (same LINESEQ as line 4).
SOURCE TABLE:
=============
LN INV ITEMNBR DATE SERIAL CUST LINESEQ
1. 14247 NOK6230i 03/07/05 3569937795666 James 114688
2. 14247 BI95 03/07/05 97918983 James 114688
3. 14247 NOK6230i 03/07/05 3569937795777 James 180224
4. 14247 BI55 03/07/05 97799922 James 180224
5. 14247 SAMD500 03/07/05 3569937795193 James 212992
6. 14247 BI55 03/07/05 97989433 James 212992
DESIRED QUERY RESULT:
=====================
INV ITEMNBR DATE SERIAL PHONE CUST LINESEQ
14247 NOK6230i 03/07/05 3569937795666 97918983 James 114688
14247 NOK6230i 03/07/05 3569937795777 97799922 James 180224
14247 SAMD500 03/07/05 3569937795193 97989433 James 212992
Your help is greatly appreciated.
Many thanks in advance.
Cheers
bokasen